Toggling GMarker on and off

Finally, with new release (v2.77) Google Maps API provides interface to toggle on and off markers on map. I will test it soon, since right now with Run-N-Share I have some problems with markers highlighting. Now to highlight marker I have destroy old one and create new one. In FireFox it causes some delay, and it is especially visible with onmouseover/out.

With this feature (marker.hide()/ it will be possible to do more smoothly. Just prepare two sets of markers to display (normal and highlighted) and toggle particular marker when mouse pointer hover over search results – should be enough.

Join the Conversation

1 Comment

  1. For highlighting markers, I’d suggest using GMarker.setImage(), which came out last release. There are several demos of it in the blog. It’s really quite nice for highlighting.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.