Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2   9.3   9.4    Statistic  

MapView.AddPoint

Adds a point or pin to the map.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
MapView 9.4 Yes No No No Yes
MBS( "MapView.AddPoint"; MapView; JSON )   More

Parameters

Parameter Description Example value
MapView The map view reference number. $$MapView
JSON The JSON to describe the point.

Result

Returns identifier or error.

Description

Adds a point or pin to the map.
The JSON may contain the following entries:
latitudeThe latitude of the coordinate.
longitudeThe longitude of the coordinate.
addressThe address to lookup to find latitude or longitude.
radiusThe radius in meter.
titleThe title for the pin.
subtitleThe subtitle for the item.
colorThe color as name or hex notation for the pin.
identifierThe identifier to use. Can be empty to get new identifier auto assigned.
imageThe base64 encoded image data to use.
imageWidthOptional the image width to use.
imageHeightOptional the image height to use.
clusteringIdentifierOptionally an identifier that determines whether the annotation view participates in clustering.
displayPriorityOptionally the display priority of this annotation view. Can be Required, High, Low or Default.

You can either pass latitude and longitude together or pass the address and we lookup it to find coordinates.

Examples

Create MBS Pin on map with custom image:

Set Variable [ $json ; Value: "{ \"address\": \"Nickenich\", \"title\": \"Monkeybread Software\", \"subtitle\": \"MBS is here\", \"imageWidth\": 40, \"imageHeight\": 40 }" ]
# add image from container field to JSON
Set Variable [ $json ; Value: MBS( "JSON.AddStringToObject"; $json; "image"; Base64Encode ( MapView::image ) ) ]
# show
Set Variable [ $r ; Value: MBS( "MapView.AddPoint"; $$MapView; $JSON) ]

Adds simple pin for Hamburg:

Set Variable [ $r ; Value: MBS( "MapView.AddPoint"; $$MapView; "{ \"address\": \"Hamburg, Germany\", \"title\": \"Hamburg\"}") ]

See also

Blog Entries

Created 10th September 2019, last changed 12nd September 2019


MapView.AddPinWithAddress   -   MapView.AddPolygon

Feedback: Report problem or ask question.




Links
MBS Xojo blog