jkid169
unread,Mar 5, 2011, 5:34:12 AM3/5/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Gothere API
Hi,
Is there a way to temporarily hide the amenities marker based on some
event? I have a few amenities tabs - bus, mrt, supermarket and so on.
I want to achieve the effect that only on the event of the tab click
that the amenities of that tab will be shown, otherwise they will be
hidden (e.g. when user clicks the bus tab, the bus markers are
displayed, when user clicks the mrt tab, mrt markers are shown and the
bus markers are hidden).
Another question - the load function of amenities service has a
parameter to specify if the preserveViewport is true or false. However
I can't seem to make it work, here's my code
var busQueryObj = new GAmenities(map, document.getElementById("bus-
tab"));
busQueryObj.clearCategories();
busQueryObj.addCategory(GAmenities.AMENITY_BUS_STOP);
busQueryObj.load(center, {preserveViewport: true});
Thanks for your help :)