MapLabel for Google Maps V3

This library allows text to be added to the map at a particular location. Note that the user's browser must support Canvas for the label to be displayed.

MapLabel class

This class extends OverlayView.

Constructor

Constructor Description
MapLabel(opt_options?:MapLabelOptions) Creates a map label with the options specified. If a map is specified, the label is added to the map upon construction. Note that both text and position must be set for the label to display.

MapLabelOptions object specification

Properties Type Description
align string The horizontal text alignment. Options are left, right or center. Default is "center".
fontFamily string The font family. Default is "sans-serif".
fontSize number The font size in pixels. Default is 12.
fontColor string The stroke color. All CSS3 colors are supported. Default is "#000000".
map Map Map on which to display label.
maxZoom number The maximum zoom level this label should be shown at.
minZoom number The minimum zoom level this label should be shown at.
position LatLng Label position. Required.
strokeWeight number The stroke width in pixels. Default is 4.
strokeColor string The stroke color. All CSS3 colors are supported. Default is "#FFFFFF".
text string Label text. Required.
zIndex number The zIndex of the label. Default is 1000.