Tuesday, May 24, 2011

Introducing the Google Maps Label Library

MapLabel Utility Library

MapLabel is a very nice utility library for the Google Maps API that allows you to add labels to Google Maps.

Labels created with the utility are dynamically rendered on Google Maps using Canvas 2D. Developers can define the font size, the font face, color and alignment of the labels. I've created a demo of the library in action here, which (at the risk of seeming obsessive) places labels on a map of the 2012 London Olympics site.

One really useful feature in the library is the maxZoom and minZoom controls. These let you define at what zoom levels labels should be visible. In my example map above if you zoom in on the Westfield Shopping Mall the 'Westfield Shopping Mall' label disappears and a number of other labels become visible, showing the locations of individual stores.

If you want to know more check out the reference documents and the source code.

Post a Comment