Query Parameters
Query parameters allow you to link to the map from other applications. This works by appending a query string to the map URL that when clicked, will zoom the user to a specific feature on the map. For example, internal staff at a council may want to search for a property in an internal rating system and then (from that same interface) open a link that takes them directly to that Property in LocalMaps.
Adding a Query Parameter
-
Click Add Query Parameter.
-
Select a query layer. This can be done from searching ArcGIS Online, data sources, or by directly inputting the query layer URL. Click next.
-
Under properties there are the following:
- Label: a name to identify the parameter. This is what appears in the menu.
- Parameter: the string that is appended to the URL, e.g., “WalkID” could be used if you were going to use Valuation ID as your parameter.
- Fixed Scale: allows enabling and disabling of a fixed scale.
- Scale: the extent to which the map zooms when the URL is opened. Only available if fixed scale is enabled.
- Layer Field: the field that the value passed in will be searched on, e.g., ID.
-
Click Save. The new Query Parameter will be added to the menu.
Editing / deleting a Query Parameter
To edit an existing parameter, simply click on the parameter. Make any necessary changes in the window and then click save. To delete a query parameter, click Delete. This will remove the query parameter from the table.
Using a Query Parameter
To use a query parameter, append the end of the map viewer URL with the following pattern: ¶meter=value. The pattern can be found under the existing Query Parameters in the admin menu. For example, if the parameter was “WalkID” and the value was “1234”, the URL would look like this: https://demos.localmaps.co.nz/demo1/viewer/?webmap=c078e59b233f4893a8dac1b9d5b6566e&WalkID=1234
. When this URL is opened, the map will go to the feature with the ID of 1234.