Browse Source

make gid consistent

pull/110/head
Rhonda Glennon 9 years ago committed by Julian Simioni
parent
commit
9dd41c1145
No known key found for this signature in database
GPG Key ID: 6DAD08919FDBF563
  1. 12
      response.md

12
response.md

@ -65,13 +65,15 @@ Additionally, `/reverse` queries will have a `distance` parameter, which is the
### `gid`
All places in Mapzen Search have a global identifier, known as a `gid`. Each matching record returned from a [`/search`](search), [`/autocomplete`](autocomplete), or [`/reverse`](reverse) geocoding request has a `gid` field.
The `gid` consists of an identifier for the dataset, a layer, and an `id` for the individual record.
The `gid` consists of a `layer` (such as `address` or `country`), an identifier for the original data source (`openstreetmap` or `openaddresses`), and an `id` for the individual record corresponding to the original source idenfier, where possible. This information is also available as properties on the individual results as `layer`, `source`, and `source_id`.
There are some important considerations for using IDs in Mapzen Search:
:rotating_light:
- You should not create your own ID values.
- ID values may not be stable.
- You should not attempt to parse ID values for information or store them for future use. You should only use IDs at the time when you receive the search results. One valid use for the `gid` is to retrieve full details on a particular result from the `place` endpoint.
Follow these guidelines regarding the `gid`:
- You should not create your own `gid` strings.
- `gid` values may not be consistent across releases.
- You should not attempt to parse `gid` strings for information or store them for future use. You should only use `gid` at the time when you receive the search results. One valid use for the `gid` is to retrieve full details on a particular result from the `/place` endpoint.
### `label`
The `label` is a human-friendly representation of the place, ready to be displayed to an end user. The label field attempts to use a format that is right for the region the result is in, although Mapzen Search only supports a few countries at the moment.

Loading…
Cancel
Save