MapsExtensionsCreatePolyElement Method

Creates a map element from a GeofenceDto and a MapMarkerDto.

Definition

Namespace: MobileTrack.Web.Components.Extensions
Assembly: MobileTrack.Web.Components (in MobileTrack.Web.Components.dll) Version: 0.7+45c8d9adb5970d727cceec44a5ed61aea0016e50
public static Task<IMapElement> CreatePolyElement(
	this MapMarkerDto mapMarker,
	GoogleMap googleMap,
	IReadOnlyCollection<LatLngLiteral> path,
	bool editable = false,
	Action? bindEvents = null
)

Parameters

mapMarker  MapMarkerDto
Map Marker the item is based on.
googleMap  GoogleMap
Google map to place the object onto
path  IReadOnlyCollectionLatLngLiteral
Path of the polygon or poly line
editable  Boolean  (Optional)
Whether the item can be edited by the user (only relevant for geofence editors)
bindEvents  Action  (Optional)
If provide a value, polygon/polyLine change events will be invoked here.

Return Value

TaskIMapElement
Task completion resulting in the generated item on googleMap

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type MapMarkerDto. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentNullExceptionInvoked if mapMarker, googleMap or path are .

See Also