Browse Source

update autocomplete to sandbox

pull/193/head
rmglennon 8 years ago
parent
commit
587cd1b18b
  1. 11
      autocomplete.md

11
autocomplete.md

@ -19,7 +19,7 @@ To focus your search based upon a geographical area, such as the center of the u
From San Francisco: From San Francisco:
> >
[/v1/autocomplete?api_key=your-mapzen-api-key&__focus.point.lat=37.7&focus.point.lon=-122.4&text=union square__](https://search.mapzen.com/v1/autocomplete?focus.point.lat=37.7&focus.point.lon=-122.4&text=union square) [/v1/autocomplete?api_key=your-mapzen-api-key&__focus.point.lat=37.7&focus.point.lon=-122.4&text=union square__](https://mapzen.github.io/search-sandbox/?query=autocomplete&focus.point.lat=37.7&focus.point.lon=-122.4&text=union square)
``` ```
1) Union Square, San Francisco County, CA 1) Union Square, San Francisco County, CA
@ -29,7 +29,7 @@ From San Francisco:
From New York City: From New York City:
> >
[/v1/autocomplete?api_key=your-mapzen-api-key&__focus.point.lat=40.7&focus.point.lon=-73.9&text=union square__](https://search.mapzen.com/v1/autocomplete?focus.point.lat=40.7&focus.point.lon=-73.9&text=union square) [/v1/autocomplete?api_key=your-mapzen-api-key&__focus.point.lat=40.7&focus.point.lon=-73.9&text=union square__](https://mapzen.github.io/search-sandbox/?query=autocomplete&focus.point.lat=40.7&focus.point.lon=-73.9&text=union square)
``` ```
1) Union Square, New York County, NY 1) Union Square, New York County, NY
@ -38,7 +38,7 @@ From New York City:
The `/autocomplete` endpoint can promote nearby results to the top of the list, while still allowing important matches from farther away to be visible. For example, searching `hard rock cafe` with a focus on Berlin: The `/autocomplete` endpoint can promote nearby results to the top of the list, while still allowing important matches from farther away to be visible. For example, searching `hard rock cafe` with a focus on Berlin:
> [/v1/autocomplete?api_key=your-mapzen-api-key&__focus.point.lat=52.5&focus.point.lon=13.3&text=hard rock cafe__](https://search.mapzen.com/v1/autocomplete?focus.point.lat=52.5&focus.point.lon=13.3&text=hard rock cafe) > [/v1/autocomplete?api_key=your-mapzen-api-key&__focus.point.lat=52.5&focus.point.lon=13.3&text=hard rock cafe__](https://mapzen.github.io/search-sandbox/?query=autocomplete&focus.point.lat=52.5&focus.point.lon=13.3&text=hard rock cafe)
with `focus.point` you will find the Berlin restaurant first: with `focus.point` you will find the Berlin restaurant first:
``` ```
@ -65,7 +65,7 @@ The `sources` parameter allows you to specify from which data sources you'd like
* `geonames` or `gn` * `geonames` or `gn`
* `whosonfirst` or `wof` * `whosonfirst` or `wof`
> [/v1/autocomplete?api_key=your-mapzen-api-key&__sources=openaddresses__&text=pennsylvania](https://search.mapzen.com/v1/autocomplete?sources=openaddresses&text=pennsylvania) > [/v1/autocomplete?api_key=your-mapzen-api-key&__sources=openaddresses__&text=pennsylvania](https://mapzen.github.io/search-sandbox/?query=autocomplete&sources=openaddresses&text=pennsylvania)
with `sources=openaddresses` you will only find addresses on Pennsylvania Ave or Street: with `sources=openaddresses` you will only find addresses on Pennsylvania Ave or Street:
``` ```
@ -82,6 +82,7 @@ without `sources=openaddresses` you will find the most popular Pennsylvanias fir
``` ```
### Layers ### Layers
The type of record is referred to as its `layer`. All records are indexed into the following layers: The type of record is referred to as its `layer`. All records are indexed into the following layers:
|layer|description| |layer|description|
@ -100,7 +101,7 @@ The type of record is referred to as its `layer`. All records are indexed into t
|`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/autocomplete?api_key=your-mapzen-api-key&__layers=coarse__&text=starbuck](https://search.mapzen.com/v1/autocomplete?layers=coarse&text=starbuck) > [/v1/autocomplete?api_key=your-mapzen-api-key&__layers=coarse__&text=starbuck](https://mapzen.github.io/search-sandbox/?query=autocomplete&layers=coarse&text=starbuck)
with `layers=coarse` you will see only administrative areas with names containing Starbuck with `layers=coarse` you will see only administrative areas with names containing Starbuck

Loading…
Cancel
Save