Merry Christmas! Enjoy 30% OFF 🎄
Coupon Code: XMAS30 - Renew: XMAS_RENEW30

Is there a way to display a map without google points of interest and other business listings. Many are incorrect and I don't want them showing on my maps, only the items listed in the categories.

I found this solution but no idea where to put it.

googleMap.setMapStyle(
MapStyleOptions.loadRawResourceStyle(
this, R.raw.style_json));

											[{

"featureType": "poi.business",
"stylers": [{"visibility": "off"}]
},
{
"featureType": "transit",
"elementType": "labels.icon",
"stylers": [{"visibility": "off"}]
}]

Hi

I'm sorry, but I'm not 100% sure what You have in mind. If the marker was added by google than there is no way to remove it, but if it was added by You, than there should be no issues. Can You please tell me the url of the page where I'll be able to see the map and tell me which marker should be removed?

    teitbite

    If you go to any category views (select Restaurant from top menu), you can see the map. There are several places marked that are not not in the category ie Red Pacific Sunset tour, Hotel Isolina.
    Also the restaurant La Perla and Nasu should not be on that page.

    There is a way to remove them, as I listed in the first post. Just not sure where to put that command

    looks like something is amiss with the component here as i can move the markers as I wish. This applies on our demo too. I shall raise it with the devs.

      Hi,

      You could try this:

      Edit the file:
      plugins/system/jagooglemap/assets/script.js

      Look for the code.

      objMap.setZoom(lvZoom);

      Add this code under it.

      var noPoi = [
      {
          featureType: "poi",
          stylers: [
            { visibility: "off" }
          ]   
        }
      ];
      
      objMap.setOptions({styles: noPoi});

      Regards

      Ok that worked. Note
      objMap.setZoom(lvZoom); is in two locations. This worked after line 314

      Also
      Search for

      map: objMap,
      draggable: true,
      and change to false.

      This solves what Phill104 noted

      Still showing on the smaller map in item view

      You can share the credentials of your site: URL, Admin + FTP account so we can take a look.

      You could edit the file :
      templates/ja_directory/html/com_k2/directory/item.php

      Look for:

      var map = new google.maps.Map(document.getElementById

      Add this code under.

      var noPoi = [
      {
          featureType: "poi",
          stylers: [
            { visibility: "off" }
          ]   
        }
      ];
      
      map.setOptions({styles: noPoi});

      Note.
      2 location to edit.

        phill104

        The map of JA Directory template based on Google Map of Google and the visitor can move and drag on the map but this value doesn’t have affect on other visitor’s session when they visit your site. The point on the map can be only changed via back-end settings or by user who has permission to change from front-end.

          saguaros

          I guess the question is why should a visitor be able to drag icons around, when there is a setting where this can be turned off ie draggable: false. Really does not make sense unless I am misunderstanding the purpose. In any case this could easily be an item to select in the JA_Googlemap settings rather than having to edit the code and risk messing up the plugin.

          I would suggest the same for turning off unwanted icons. There are many on google maps. I can see why some would prefer to have them, but it should be an option to select. Considering the map is one of the key features or this template, someone should look into making this more feature friendly. JMO.

          Also not sure how to PM anything on this board. Thanks Phil104 and Mo0nlight

          7 days later
          Write a Reply...
          You need to Login to view replies.