Class LabeledMarker
Allows you to define markers with associated labels. As you would expect, if the marker is draggable, so too will be the label. In addition, a marker with a label responds to all mouse events in the same manner as a regular marker.
Inherited Members
Namespace:GoogleMaps.Markers
Assembly:GoogleMaps.dll
Syntax
public class LabeledMarker : Marker, IScriptDescriptorData
Properties
CrossImage
The URL of the cross image to be displayed while dragging a marker. The default value is "http://maps.gstatic.com/intl/en_us/mapfiles/drag_cross_67_16.png".
Declaration
public string CrossImage { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HandCursor
The URL of the cursor to be displayed while dragging a marker. The default value is "http://maps.gstatic.com/intl/en_us/mapfiles/closedhand_8_8.cur".
Declaration
public string HandCursor { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LabelAnchor
By default, a label is drawn with its anchor point at (0,0) so that its top left corner is positioned at the anchor point of the associated marker. Use this property to change the anchor point of the label. For example, to center a 50px-wide label beneath a marker, specify a labelAnchor of google.maps.Point(25, 0). (Note: x-values increase to the right and y-values increase to the top.)
Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public Point LabelAnchor { get; set; }
Property Value
Type | Description |
---|---|
Point |
LabelClass
The name of the CSS class defining the styles for the label. Note that style values for position, overflow, top, left, zIndex, display, marginLeft, and marginTop are ignored; these styles are for internal use only.
Declaration
public string LabelClass { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LabelContent
The content of the label (plain text or an HTML DOM node). To specify an HTML DOM node by its id it should start with #.
Declaration
public string LabelContent { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LabelControlID
The ID of the control to be used as content of the label.
Declaration
public string LabelControlID { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LabelInBackground
A flag indicating whether a label that overlaps its associated marker should appear in the background (i.e., in a plane below the marker). The default is false, which causes the label to appear in the foreground.
Declaration
public bool LabelInBackground { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LabelStyle
An object literal whose properties define specific CSS style values to be applied to the label. Style values defined here override those that may be defined in the labelClass style sheet. If this property is changed after the label has been created, all previously set styles (except those defined in the style sheet) are removed from the label before the new style values are applied. Note that style values for position, overflow, top, left, zIndex, display, marginLeft, and marginTop are ignored; these styles are for internal use only.
Declaration
public string LabelStyle { get; set; }
Property Value
Type | Description |
---|---|
System.String |
LabelVisible
A flag indicating whether the label is to be visible. The default is true. Note that even if labelVisible is true, the label will not be visible unless the associated marker is also visible (i.e., unless the marker's visible property is true).
Declaration
public bool LabelVisible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Optimized
A flag indicating whether rendering is to be optimized for the marker. Important: The optimized rendering technique is not supported by MarkerWithLabel, so the value of this parameter is always forced to false.
Declaration
public bool Optimized { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
ToScriptData()
Declaration
public override IDictionary<string, object> ToScriptData()
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> |