This library extends the Google Maps API's standard GMarker class with the ability to support markers with textual labels. Please see articles here:
For a description and examples of how to use this library, check out the how-to.
Constructor | Description |
---|---|
LabeledMarker(latlng:GLatLng, opt_opts?:LabeledMarkerOptions) |
Creates a marker with options specified in LabeledMarkerOptions
(extension of GMarkerOptions ). Creates a div for the
label and then calls the GMarker constructor. |
Methods | Return Value | Description |
---|---|---|
getLabelVisibility() |
Boolean |
Returns whether label visibility is set on. |
setLabelText(text:String) |
None |
Sets label text/html for the marker. |
setLabelVisibility(visibility:Boolean) |
None |
Sets the visibility of the label, which will be respected during show/hides. If marker is visible when set, it will show or hide label appropriately. |
This class extends GMarkerOptions
. Instances of this
class are used in the opt_opts
argument to the
constructor of the LabeledMarker
class. At this time the
draggable
property is not supported and is forced to be
false
. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties | Type | Description |
---|---|---|
labelClass |
String |
CSS class to use for the overlay div (default "LabeledMarker_markerLabel"). |
labelOffset |
GSize |
Label offset, the x- and y-distance between the marker's latlng and the upper-left corner of the text div (default (0,0)). |
labelText |
String |
Label text/html to place in the overlay div (defaults to empty string). |