[Google Maps API v2] Re: Dont show any markers on load, only on click
... although now that I look at your code I notice that you already
have your markers stored in an array, so all you have to do is put
this:
for (var g = 0; g < gmarkers.length; g++) {
gmarkers[g].hide();
}
marker.show();
after the line that says:
GEvent.addListener(marker, "click", function() {
I guess if you only have 5 markers, looping through them is not such a
big deal. I have 80 and it seems to happen fairly quickly.
I do like your idea, though, Martin... I might have a play around with
it.
--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home