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.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3   10.4    Statistic  


Sets script trigger.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
MapView 9.3 Yes No No No Yes
MBS( "MapView.SetScript"; MapView { ; Filename; ScriptName } )   More


Parameter Description Example value
MapView The map view reference number. $$MapView
Filename Optional
The database file name where the script is located.
ScriptName Optional
The script name.


Returns OK or error.


Sets script trigger.
Script is called for pins with identifiers when clicked.
With version 9.5, we start passing JSON with various values included. Version 9.3 and 9.4 only pass annotation identifier.

The JSON includes mapViewID, annotationIdentifier, latitude, longitude, mouseInViewX, mouseInViewY, mouseInWindowX, mouseInWindowY, mouseLocationX, mouseLocationY, reason and overlayIdentifiers.

overlayIdentifiers are found by bounding rectangles, so we don't check polygons or circles exactly!

The JSON contains an entry reason for why the script was called including Touch, Click, AnnotationMoved, and AnnotationSelected.


Set script:

Set Variable [ $$MapView ; Value: MBS("MapView.CreateWithControl"; 0; "PlaceHolder") ]
Set Variable [ $r ; Value: MBS("MapView.SetScript"; $$MapView; Get(FileName); "PinClicked") ]

See also

Example Databases

Blog Entries

Release notes

Created 6th June 2019, last changed 23th September 2019

MapView.SetRotateEnabled   -   MapView.SetScrollEnabled

Feedback: Report problem or ask question.

MBS Xojo PDF Plugins