Home › Toolset Professional Support › [Resolved] How to hide Google Map POIs in View?
Problem:
I am trying to disable POI pop ups in google map in View. There seem to be no option or short code to do that. As shown in screen shot, the POIs pops up easily on mobile especially in dense urban areas where there are many businesses. This shifts the map from the Markers I want to show. And I don't need these POIs at all.
Google presents option to do this via Styling: https://developers.google.com/maps/documentation/android-api/poi
But I do not know how to apply all these codes in Toolset.
Solution:
It is possible to customize style of Toolset maps, for example,
1) create a json file "No-poi.json", with the codes as the document you mentioned above:
[ { "featureType": "poi.business", "stylers": [ { "visibility": "off" } ] } ]
https://developers.google.com/maps/documentation/android-api/poi
2) upload it to your webserver, you will get the URL of the json file, for example:
http://site-url/wp-content/uploads/2018/03/No-poi.json
3) Then edit the map shortcode [wpv-map-render], add attribute "style_json" in it, specific the value as the JSON file URL, for example:
[wpv-map-render style_json="http://site-url/wp-content/uploads/2018/03/No-poi.json" ...][/wpv-map-render]
Relevant Documentation:
https://toolset.com/documentation/user-guides/display-on-google-maps/using-custom-styles-for-maps/
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Our next available supporter will start replying to tickets in about 2.05 hours from now. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
Tagged: Toolset Maps, Views plugin
Related documentation:
This topic contains 3 replies, has 2 voices.
Last updated by Luo Yang 6 years, 8 months ago.
Assisted by: Luo Yang.
Hi,
I am trying to disable POI pop ups in google map in View. There seem to be no option or short code to do that. As shown in screen shot, the POIs pops up easily on mobile especially in dense urban areas where there are many businesses. This shifts the map from the Markers I want to show. And I don't need these POIs at all.
Google presents option to do this via Styling: hidden link
But I do not know how to apply all these codes in Toolset.
Any advice?
Hello,
It is possible to customize style of Toolset maps, for example,
1) create a json file "No-poi.json", with the codes as the document you mentioned above:
[ { "featureType": "poi.business", "stylers": [ { "visibility": "off" } ] } ]
hidden link
2) upload it to your webserver, you will get the URL of the json file, for example:
hidden link
3) Then edit the map shortcode [wpv-map-render], add attribute "style_json" in it, specific the value as the JSON file URL, for example:
[wpv-map-render style_json="<em><u>hidden link</u></em>" ...][/wpv-map-render]
More help:
https://toolset.com/documentation/user-guides/display-on-google-maps/using-custom-styles-for-maps/
Works great . Thanks for the steps!
You are welcome