Class MarkerOptions
Inherited Members
Namespace:GoogleMaps.Markers
Assembly:GoogleMaps.dll
Syntax
public class MarkerOptions : IScriptDescriptorData
Properties
Animation
Which animation to play when marker is added to a map.
Declaration
public MarkerAnimation? Animation { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<MarkerAnimation> | The animation. |
Clickable
Gets or sets a value indicating whether this MarkerOptions is clickable. If true, the marker receives mouse and touch events. Default value is true.
Declaration
public bool ? Clickable { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
|
Cursor
Mouse cursor to show on hover
Declaration
public string Cursor { get; set; }
Property Value
Type | Description |
---|---|
System.String | The cursor. |
Draggable
Gets or sets a value indicating whether this MarkerOptions is draggable. If true, the marker can be dragged. Default value is false.
Declaration
public bool ? Draggable { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
|
Flat
Gets or sets a value indicating whether this MarkerOptions is flat. If true, the marker shadow will not be displayed.
Declaration
public bool ? Flat { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
|
Icon
Icon for the foreground.
Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public MarkerImage Icon { get; set; }
Property Value
Type | Description |
---|---|
MarkerImage | The icon. |
Optimized
Gets or sets a value indicating whether this MarkerOptions is optimized. Optimization renders many markers as a single static element. Optimized rendering is enabled by default. Disable optimized rendering for animated GIFs or PNGs, or when each marker must be rendered as a separate DOM element (advanced usage only).
Declaration
public bool ? Optimized { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
|
Position
Marker position. Required.
Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public LatLng Position { get; set; }
Property Value
Type | Description |
---|---|
LatLng | The position. |
RaiseOnDrag
Gets or sets a value indicating whether [raise on drag]. If false, disables raising and lowering the marker on drag. This option is true by default. If a draggable marker is being created and a version of Google Maps API earlier than V3.3 is being used, this property must be set to false.
Declaration
public bool ? RaiseOnDrag { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
|
Shadow
Gets or sets the shadow image.
Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public MarkerImage Shadow { get; set; }
Property Value
Type | Description |
---|---|
MarkerImage | The shadow. |
Shape
Gets or sets the shape. Image map region definition used for drag/click.
Declaration
public MarkerShape Shape { get; set; }
Property Value
Type | Description |
---|---|
MarkerShape | The shape. |
Title
Gets or sets the title. Rollover text.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | The title. |
Visible
Gets or sets a value indicating whether this MarkerOptions is visible. If true, the marker is visible
Declaration
public bool ? Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
|
ZIndex
All markers are displayed on the map in order of their zIndex, with higher values displaying in front of markers with lower values. By default, markers are displayed according to their vertical position on screen, with lower markers appearing in front of markers further up the screen.
Declaration
public int ? ZIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> | The index. |
Methods
FromScriptData(Object)
Retrieves an instance from script data.
Declaration
public static MarkerOptions FromScriptData(object scriptObject)
Parameters
Type | Name | Description |
---|---|---|
System.Object | scriptObject | The script object. |
Returns
Type | Description |
---|---|
MarkerOptions |
ToScriptData()
Returns the instance as a script data.
Declaration
public virtual IDictionary<string, object> ToScriptData()
Returns
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> |