Class MarkerImage
Defines an image to be used as the icon or shadow for a Marker. 'origin' and 'size' are used to select a segment of a sprite image and 'anchor' overrides the position of the anchor point from its default bottom middle position. The anchor of an image is the pixel to which the system refers in tracking the image's position. By default, the anchor is set to the bottom middle of the image (coordinates width/2, height). So when a marker is placed at a given LatLng, the pixel defined as the anchor is positioned at the specified LatLng. To scale the image, whether sprited or not, set the value of scaledSize to the size of the whole image and set size, origin and anchor in scaled values. The MarkerImage cannot be changed once constructed.
Inheritance
Inherited Members
Namespace:GoogleMaps.Markers
Assembly:GoogleMaps.dll
Syntax
public class MarkerImage : IScriptDescriptorData
Properties
Anchor
Gets or sets the anchor.
Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public Point Anchor { get; set; }
Property Value
| Type | Description |
|---|---|
| Point | The anchor. |
Origin
Gets or sets the origin.
Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public Point Origin { get; set; }
Property Value
| Type | Description |
|---|---|
| Point | The origin. |
ScaledSize
Gets or sets the size of the scaled.
Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public Size ScaledSize { get; set; }
Property Value
| Type | Description |
|---|---|
| Size | The size of the scaled. |
Size
Gets or sets the size.
Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public Size Size { get; set; }
Property Value
| Type | Description |
|---|---|
| Size | The size. |
Url
The URL of the marker image.
Declaration
public string Url { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | The URL. |
Methods
FromScriptData(Object)
Retrieves an instance from script data.
Declaration
public static MarkerImage FromScriptData(object scriptObject)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | scriptObject | The script object. |
Returns
| Type | Description |
|---|---|
| MarkerImage |
ToScriptData()
Returns the instance as a script data.
Declaration
public IDictionary<string, object> ToScriptData()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IDictionary<System.String, System.Object> |
Implements
ToString()
Returns a System.String that represents this instance.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A System.String that represents this instance. |
Overrides
Operators
Implicit(MarkerImage to String)
Performs an implicit conversion from MarkerImage to System.String.
Declaration
public static implicit operator string (MarkerImage image)
Parameters
| Type | Name | Description |
|---|---|---|
| MarkerImage | image | The image. |
Returns
| Type | Description |
|---|---|
| System.String | The result of the conversion. |
Implicit(String to MarkerImage)
Performs an implicit conversion from System.String to MarkerImage.
Declaration
public static implicit operator MarkerImage(string url)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | url | The URL. |
Returns
| Type | Description |
|---|---|
| MarkerImage | The result of the conversion. |