Custom Location Extension API Developer's Guide

Proximity Search

Search for custom geometries that are within a given radius around a center.

The number of geometries in the response should not exceed 1000, and the search space must not comprise more than 150 tiles. Exceeding one of the limits results in an error response. If an application needs more results returned then please contact technical customer support to work on a solution to reduce this.

Resource URI

GET /search/proximity.json

Resource Parameters

Parameters Required? Description
app_id Yes A URL-safe encoded string obtained during the application registration. See Acquiring Credentials for information on getting credentials.
app_code Yes A URL-safe encoded string obtained during the application registration. See Acquiring Credentials for information on getting credentials.
layer_ids Yes Comma separated list of layer IDs to be searched. Layer names are not case sensitive. The maximum length of a layer name and the permitted characters can be lookup up in the service via /serviceconfiguration.json
attributes No List of comma separated column names to specify which attributes shall appear in the result. Column names are not case sensitive. Default = all.
proximity Yes

The circular search area specified by center latitude, longitude [WGS84 degrees], radius [meter].

All geometries overlapping this circle will be returned, sorted by distance, closest first.

Example: proximity=47.731,7.5549,100

Multiple coordinate pairs can be passed as a semicolon separated list. For each of them, the layer_ids list is searched. If each coordinate pair is searched in a different set of layers, layer_ids contains a semicolon separated list of (comma separated list of) layers.

geom No local, full or none. Specifies the geometry representation in the result. Default = local. Local geometry is used for map display purposes, returning geometry pieces that cover the given search radius, bounding box or corridor polygon. Full geometry is used for interactive editing, where the original geometry is required. None is used for applications like geofencing, which most of the time want to know only the ids of the geofence points/lines polygones they are in or near.
filter No

An JavaScript expression being evaluated for each geometry matching search query.

Columns value for the geometry are available as defined variables.

When specified, only geometries where expression evaluates to true will be returned.

Example: filter=RATING > 3 && NAME != 'MyPlace23' && NAME.startsWith('Food')

Parameter value must be url encoded when using special characters.

This filter expression is applied after the spatial filtering, hence only to few geometries. Only for the all.json the filter is applied to all geometries, so it can become very slow for big layers. Hence, following substring search expressions use database indexes and are much faster than other filter expressions (for updatable layers):

  • COL_NAME.indexOf("my_substring") >= 0
  • COL_NAME.startsWith("my_prefix")
  • COL_NAME == "str"
  • COL_NAME === "str"
  • COL_NAME != "str"
  • COL_NAME !== "str"
  • COL_NAME.indexOf("str") >= 0
  • COL_NAME.startsWith("str")
  • COL_NAME.like("%str%")
callback No Specifies the function used to wrap the JSON response.

Response Example

To see an example of a proximity search response, see Proximity Search for Custom Geometries.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.