Initializes a new instance of the Marker class. Creates a new instance of a Marker

Namespace: Reimers.Google.Map
Assembly: Reimers.Google.Map (in Reimers.Google.Map.dll) Version: 5.3.95.699 (5.3.95.699)

Syntax

C#
public Marker(
	Guid id,
	ICoordinates point
)

Parameters

id
Type: System..::..Guid
The ID of the Marker.
point
Type: Reimers.Core.Maps..::..ICoordinates
The location of the Marker as a LatLng.

Remarks

Creating a marker using this creates a static marker with the minimum information needed. Further data and functionallity can be added after the marker is created.

Examples

The following example shows how to create a marker in a click event handler to place a marker on the clicked location and persist the state of the control.

CopyC#
void Map_Click(object sender, CoordinatesEventArgs e)
{
    Marker marker = new Marker(
        DateTime.Now.Millisecond.ToString(),
        e.Position);
    e.MapCommand = e.Map.AddOverlay(marker, true);
}

See Also