Browse Source

Reorder part of the reverse documentation

An example query in the reverse docs was listed after a giant table of
all possible layers values, which was a little confusing. This moves the
example query to right after the text describing it, and adds a little
more context for the table.
pull/191/head
Julian Simioni 8 years ago
parent
commit
7f40a61696
No known key found for this signature in database
GPG Key ID: 6DAD08919FDBF563
  1. 6
      reverse.md

6
reverse.md

@ -57,6 +57,9 @@ By default, reverse geocoding returns results from any [data source](data-source
Without specifying further, reverse geocoding doesn't restrict results to a particular type (street, venue, neighbourhood, and so on). If your application is only concerned with, say, which city a latitude, longitude is closest to, then use the `layers` parameter. For example, the following request returns only results that are localities (cities and towns): Without specifying further, reverse geocoding doesn't restrict results to a particular type (street, venue, neighbourhood, and so on). If your application is only concerned with, say, which city a latitude, longitude is closest to, then use the `layers` parameter. For example, the following request returns only results that are localities (cities and towns):
>[/v1/reverse?api_key=mapzen-xxxxxx&point.lat=48.858268&point.lon=2.294471&___layers=locality___](https://search.mapzen.com/v1/reverse?point.lat=48.858268&point.lon=2.294471&layers=locality)
Here are all the supported layers and their meanings:
|layer|description| |layer|description|
|----|----| |----|----|
|`venue`|points of interest, businesses, things with walls| |`venue`|points of interest, businesses, things with walls|
@ -73,9 +76,6 @@ Without specifying further, reverse geocoding doesn't restrict results to a part
|`neighbourhood`|social communities, neighbourhoods| |`neighbourhood`|social communities, neighbourhoods|
|`coarse`|alias for simultaneously using all administrative layers (everything except `venue` and `address`)| |`coarse`|alias for simultaneously using all administrative layers (everything except `venue` and `address`)|
>[/v1/reverse?api_key=mapzen-xxxxxx&point.lat=48.858268&point.lon=2.294471&___layers=locality___](https://search.mapzen.com/v1/reverse?point.lat=48.858268&point.lon=2.294471&layers=locality)
### Filter by country ### Filter by country
If you are performing a reverse geocode near a country boundary, and are only interested in results from one country and not the other, you can specify a country code. You can set the `boundary.country` parameter value to the alpha-2 or alpha-3 [ISO-3166 country code](https://en.wikipedia.org/wiki/ISO_3166-1). For example, the latitude,longitude pair `47.270521,9.530846` is on the boundary of Austria, Liechtenstein, and Switzerland. Without specifying a `boundary.country`, the first 10 results returned may come from all three countries. By including `boundary.country=LIE`, all 10 results will be from Liechtenstein. Here's the request in action: If you are performing a reverse geocode near a country boundary, and are only interested in results from one country and not the other, you can specify a country code. You can set the `boundary.country` parameter value to the alpha-2 or alpha-3 [ISO-3166 country code](https://en.wikipedia.org/wiki/ISO_3166-1). For example, the latitude,longitude pair `47.270521,9.530846` is on the boundary of Austria, Liechtenstein, and Switzerland. Without specifying a `boundary.country`, the first 10 results returned may come from all three countries. By including `boundary.country=LIE`, all 10 results will be from Liechtenstein. Here's the request in action:

Loading…
Cancel
Save