Link from Third Party Apps (Draft)

If you have an independent third party web application and you wish to create a link in that application that will zoom to a feature in FacilitiesMap, perform the following steps:

In the third party application, you must generate a query string that would be sent to the FacilitiesMap application at the URL you are using.  These are the steps:

Programatically create a Query String with the following parameters (ALL REQUIRED):

dataDefinitionId
keys
keysDelimiter
enableLayer
autoZoom
autoSelect
selectTriggersInfobar
alertOnError




The only command currently implemented is ZoomToFeatures.

A sample output looks like this:

{"alertOnError":"true","autoSelect":"true","dataDefinitionId":"57","selectTriggersInfobar":"true","keysDelimiter":"|","keys":"13084|13088","enableLayer":"true","autoZoom":"true"}


To quickly URLEncode it, you can use something like:


The query string for ZoomToFeatures would then be:

?cmd=ZoomToFeatures&args=ENCODED_JSON

Where ENCODED_JSON is the above JSON URLEncoded. So, for example:

?cmd=ZoomToFeatures&args=%7B%22alertOnError%22%3A%22true%22%2C%22autoSelect%22%3A%22true%22%2C%22dataDefinitionId%22%3A%2257%22%2C%22selectTriggersInfobar%22%3A%22true%22%2C%22keysDelimiter%22%3A%22%7C%22%2C%22keys%22%3A%2213084%7C13088%22%2C%22enableLayer%22%3A%22true%22%2C%22autoZoom%22%3A%22true%22%7D

To add a login to the link, copy the enc=xxx from an autologin link.

Initial Map

The initial map can be set with MapID=X where X is the MapID, e.g.:
?MapID=5
or, if also using cmd above:

?cmd=ZoomToFeatures&args=ENCODED_JSON&MapID=5
 
The user must be able to access the given map in order for this to work.

[Last updated for version 2306 (12/2012)]
Comments