Class MarkerShape
This object defines the marker shape to use in determination of a marker's clickable region. The shape consists of two properties — type and coord — which define the general type of marker and coordinates specific to that type of marker.
Inheritance
Inherited Members
Namespace:GoogleMaps.Markers
Assembly:GoogleMaps.dll
Syntax
public class MarkerShape : IScriptDescriptorData
Properties
Coords
The format of this attribute depends on the value of the type and follows the w3 AREA coords
specification found at http://www.w3.org/TR/REC-html40/struct/objects.html#adef-coords.
Coords
is an array of integers that specify the pixel position of the shape relative
to the top-left corner of the target image.
The coordinates depend on the value of type as follows:
- circle: coord is [x1,y1,r] where x1,y2 are the coordinates of the center of the circle, and r is the radius of the circle.
- poly: coord is [x1,y1,x2,y2...xn,yn] where each x,y pair contains the coordinates of one vertex of the polygon.
- rect: coord is [x1,y1,x2,y2] where x1,y1 are the coordinates of the upper-left corner of the rectangle and x2,y2 are the coordinates of the lower-right coordinates of the rectangle.
Declaration
public int[] Coords { get; set; }
Property Value
Type | Description |
---|---|
System.Int32[] | The coords. |
Type
Describes the shape's type and can be circle, poly or rect.
Declaration
public MarkerShapeType Type { get; set; }
Property Value
Type | Description |
---|---|
MarkerShapeType | The type. |
Methods
FromScriptData(IDictionary<String, Object>)
Retrieves an instance from script data.
Declaration
public static MarkerShape FromScriptData(IDictionary<string, object> data)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | data | The data. |
Returns
Type | Description |
---|---|
MarkerShape |
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> |