How to hide the amenities marker

9 views
Skip to first unread message

jkid169

unread,
Mar 5, 2011, 5:34:12 AM3/5/11
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 :)
Reply all
Reply to author
Forward
0 new messages