Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
MapView.AddPolygon
Adds a polygon to the map.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| MapView | 9.4 | Yes | No | No | No | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| MapView | The map view reference number. | $$MapView |
| JSON | The JSON to describe the circle. |
Result
Returns identifier or error.
Description
Adds a polygon to the map.The JSON may contain the following entries:
| 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. |
You can either pass latitude and longitude together or pass the address and we lookup it to find coordinates.
Examples
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\"
}")]
See also
Example Databases
Blog Entries
- Neue Funktionen des MBS FileMaker Plugin 9.4
- MBS FileMaker Plugin, version 9.5pr1
- MBS FileMaker Plugin, version 9.4pr7
Release notes
- Version 9.5
- Added strokeColor and fillColor properties for MapView.AddPolygon and MapView.AddPolyline functions.
- Version 9.4
- Added MapView.AddPoint, MapView.AddPolyline and MapView.AddPolygon functions.
Created 11st September 2019, last changed 20th September 2019
MapView.AddPoint - MapView.AddPolyline
Feedback: Report problem or ask question.
Links
MBS Xojo Plugins