How to remove certain places on a map

278 views
Skip to first unread message

Junsuk Bang

unread,
Oct 10, 2011, 10:40:42 PM10/10/11
to google-map...@googlegroups.com
Hi all,
 
I'm wondering if it is able to remove information about uninteresting places on a map.
 
According to docs about Google Places API, it is possible immediately to add place info I wanna put on.
 
However, they do not mention about removing a certatin place which I do not want to show to guests of my page,
 
So, let me know whether it is possible or not, and how to remove place info which I do not want to show if possible.
 
 
Thanks.
 
Junsuk
 
 

BruceB

unread,
Oct 11, 2011, 11:41:45 AM10/11/11
to google-map...@googlegroups.com
You can remove points of interest (POIs) from your map using the styling features:  http://code.google.com/apis/maps/documentation/javascript/styling.html#styling_the_default_map
and

Just set the visible property to off for the categories you want hidden:
[ { featureType: "poi.government", stylers: [ { visibility: "off" } ] } ]

The styling wizard is useful for figuring out the style syntax: http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html

Junsuk Bang

unread,
Oct 11, 2011, 9:38:21 PM10/11/11
to google-map...@googlegroups.com
Oh, it is so helpful for me who is a real beginner of google Maps API and Javascript.
 
Thanks.
 
But, I have one more thing to ask.
 
By setting the visibility option of featuretypes, I can only remove a group of features like all goverment things, all business things.
 
If I want to remove all stores around my store, but wanna leave my store...
 
could you let me know what I can do?
 

BruceB

unread,
Oct 11, 2011, 11:01:51 PM10/11/11
to google-map...@googlegroups.com
You can't specifically show one particular store or set of stores in the styling interface.
You would have to hide all POIs, and then use the Places API to search for and show your store(s) using the Marker overlay.
Reply all
Reply to author
Forward
0 new messages