Map style and distance measure units

WCMp Core

Map style and distance measure units Open

Viewing 6 reply threads
  • Author
    Posts
    • #92282
      sinjori
      Participant

      Hello,

      Vendor page has a Google map at the top of the list of the vendors. We need to setup default view of that Map – it should be just Map (not Styled map, or Satelite view).
      Also, below the Map, we have Vendor filters with some distance units (Kilometers, Miles and nautical Miles). We have to remove Miles and Nautical Miles and leave just Kilometers.
      How we can do that?

      Thank you very much.
      Best regards,

      Sinisa S.

    • #92356
      sinjori
      Participant

      Hello,

      Could you please let me know, when I can expect your answer.
      P.S. Yesterday, we bought Advanced Frontend Manager plugin, and we are finishing our shop. Just need your answer to finish it completely.
      Thank you very much.

      Best regards

    • #92358

      Hi @sinjori,
      for your first question “Vendor page has a Google map at the top of the list of the vendors. We need to setup default view of that Map – it should be just Map (not Styled map, or Satelite view)” :
      use this below code in your current active themes functions.php file

      
      /*********************   Remove satelite view and styled map in vendor list page *****************************************/
      add_filter('wcmp_vendor_list_script_data_params','wcmp_vendor_list_script_data_params_default_map', 10 , 2 );
      function wcmp_vendor_list_script_data_params_default_map( $script_param, $request ){
        $script_param['map_data']['map_style'] = false;
        unset($script_param['map_data']['map_options']['mapTypeControlOptions']['mapTypeIds'][1] );
        return $script_param;
      }
      Copy

      For your second question “Also, below the Map, we have Vendor filters with some distance units (Kilometers, Miles and nautical Miles). We have to remove Miles and Nautical Miles and leave just Kilometers.”:
      You have to Override this template by copying it to yourtheme/dc-product-vendor/shortcode/vendor_lists.php
      Then just remove line no 43 and 45.

    • #92361
      sinjori
      Participant

      Hello Raju,

      Thank you for your answer.
      However, we don’t wish to remove Satelite view and Styled map. We just wish to setup default Map view to Map. By default it’s set up to Styled.

      Regarding the second question…
      What exactly I have to copy to – yourtheme/dc-product-vendor/shortcode/vendor_lists.php? Which file?

      Thank you very much.
      Regards

    • #92418

      @sinjori, by above filter by default you get a normal map and also have satellite map. but in case of Styled map this will be totally removed. So if you want to display all three map and by deafult normal map should open then you have to remove a line from our core plugin. line no 28 in vendor-list.js file.
      As this is modification of core plugin, hence this is not recommended. We will see, whether we can add such a filter in our future update.

      Just goto your current theme folder then create a folder name “dc-product-vendor”.then within that folder create another folder “shortcode”.Finally on that folder create vendor_lists.php this file (copy and pass the main file content here) and modified the changes.

    • #92461
      sinjori
      Participant
      This reply has been marked as private.
    • #92528
      This reply has been marked as private.
Viewing 6 reply threads

Please LOGIN to reply to this topic

COVID-19 Outbreak: WCMp team is supporting business affected by coronavirus

Read the Message Buy at Slashed Price