Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Adds a polygon to the map.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
MapView | 9.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
Parameter | Description | Example |
---|---|---|
MapView | The map view reference number. | $$MapView |
JSON | The JSON to describe the circle. |
Returns identifier or error.
coordinates | The JSON array with the objects for the coordinates. Each entry can contain either longitude & latitude pair, x and y pair or address value. |
title | The title for the polygon. |
subtitle | The subtitle for the item. |
fillColor | The fill color as name or hex notation for the polygon. |
strokeColor | The stroke color as name or hex notation for the polygon. |
identifier | The identifier to use. Can be empty to get new identifier auto assigned. |
lineWidth | The line width to use. Default 5 point. |
Add polygon from Hamburg to Munich and Cologne:
Set Variable [ $r ; Value: MBS( "MapView.AddPolygon"; $$MapView; "{ \"coordinates\": [{\"address\": \"Hamburg, Germany\"}, {\"address\": \"Munich, Germany\"}, {\"address\": \"Cologne, Germany\"}], \"strokeColor\": \"#FF000077\" }") ]
Add polygon with some coordinates:
Set Variable [ $r ; Value: MBS( "MapView.AddPolygon"; $$MapView; "{
\"coordinates\":
[
{\"longitude\": 7.3, \"latitude\": 50.4},
{\"longitude\": 7.3, \"latitude\": 50.5},
{\"longitude\": 7.4, \"latitude\": 50.5},
{\"longitude\": 7.4, \"latitude\": 50.4}
],
\"strokeColor\": \"#FF000077\"
}")]
This function is free to use.
Created 11st September 2019, last changed 20th September 2019