Our GeoJSON update for WebApps will work with both newly created WebApps, and WebApps that have been updated after the release of this update.

To apply the update to an existing WebApp, simply go to the WebApp Builder view, and click 'Save'.

Editing the WebApp item

Webapp items have 2 new fields by default:

  • location - GeoJSON - Stores the location value of your item as coordinates - [long, lat]
  • address - Text - Stores the human-readable address value of your item

To set these values in Siteglide you will see the new 'Location' tab on the WebApp item edit view. Here you have 2 choices:

  1. Search for an address and then select it from the results dropdown - Recommended
  2. Manually enter the Address and Longitude/Latitude values for your item

Querying the data

Our new Location Search feature relies on 2 URL parameters to work:

  1. longlat - LongLat - The coordinate value of the center point for the search - long,lat
  2. distance - Int - The number of kilometres from the center point

Example - /map?longlat=-1.2660643,51.3926564&distance=18

To display results from these parameters you will need the new use_location_search parameter on your WebApp include:

use_location_search - 'true' or 'false' - default: 'false'

Example - {%- include 'webapp', id: '1', use_location_search: 'true' -%}

Note - Location Search `(uselocationsearch) and Text Search(usesearch`) will not work together at the same time_