LabeledMarker v1.1: Now supporting marker and label toggling!

Tuesday, October 09, 2007 at 8:24:00 AM

Google Project Hosting is a nifty place to store an open source project - besides offering an SVN (Subversion) repository, it also includes a wiki and an easy-to-use bug reporting system. A developer took advantage of that system to report that LabeledMarker v1.0 needed its own show and hide methods. While putting those methods in, I realized it'd be useful to have functions to toggle label visibility as well, so that a developer could add behavior to show or hide labels on marker mouseover or other events. Thus, LabeledMarker v1.1 now has: showLabel, hideLabel, setLabelVisibility, and getLabelVisibility.

Check out the example map below which uses setLabelVisibility, show, and hide to let the user toggle marker groups and labels. A full explanation of this example is located within the documentation, and a more thorough explanation of the new functions is located within the reference. If you want to use the new functions, you can grab the new javascript from the 1.1/src folder, or wait two weeks for it to be pushed into the release directory.