Browse Source

Merge pull request #23 from pelias/tweaks

Tweaks
pull/28/head
Rhonda Glennon 9 years ago
parent
commit
6f7f1d60f2
  1. 2
      api.md
  2. 4
      place.md
  3. 6
      reverse.md
  4. 8
      search.md
  5. 4
      transition-from-beta.md

2
api.md

@ -2,7 +2,7 @@
## Obtain an API key
To use the Mapzen Search service, you must first obtain a free, developer API key. Sign in at https://mapzen.com/developers to create and manage your API keys.
To use the Mapzen Search service, you must first obtain a free developer API key. Sign in at https://mapzen.com/developers to create and manage your API keys.
1. Go to https://mapzen.com/developers.
2. Sign in with your GitHub account. If you have not done this before, you need to agree to the terms first.

4
place.md

@ -14,10 +14,6 @@ For example, this `/place` query looks up the Eiffel Tower in OSM:
https://search.mapzen.com/v1/place?api_key=search-XXXXXXX&ids=osm:venue:5013364
***From Rhonda -- looks like this returns a radio station in Michigan? Also need to redo the query to include production server and the reader's API key***
*** From Rhonda -- what are some examples of when you would use a /place search? When would you have this info and need to get the details? What would you do with it.***
## Search for multiple places in a query
To search for more than one `/place` in a request, join multiple values together and separate them with a comma. For example, this /place query looks up the Eiffel Tower in OSM and `30 West 26th St, New York, NY` in OpenAddresses:

6
reverse.md

@ -18,7 +18,7 @@ To get started with reverse geocoding, you need a [free, developer API key](http
Notice that the first result is the Eiffel Tower (well, Tour Eiffel). The output is the standard GeoJSON format.
reverse geocoding
## Reverse geocoding parameters
Similar to other queries with Mapzen Search, reverse geocoding has optional, additional parameters you can use to refine results.
@ -46,7 +46,7 @@ By default, reverse geocoding returns results from any source available to Mapze
>[/v1/reverse?api\_key={YOUR-KEY}&point.lat=48.858268&point.lon=2.294471&___sources=osm___](https://search.mapzen.com/v1/reverse?api_key={YOUR_API_KEY}&point.lat=48.858268&point.lon=2.294471&sources=osm)
***TO DO: Add correct link**** For more information on the data each source provides, see [this link](http://source link).
***TO DO: Add correct link*** For more information on the data each source provides, see [this link](http://source link).
### Filter by layers
@ -54,7 +54,7 @@ Without specifying further, reverse geocoding doesn't restrict results to a part
>[/v1/reverse?api\_key={YOUR-KEY}&point.lat=48.858268&point.lon=2.294471&___layers=locality___](https://search.mapzen.com/v1/reverse?api_key={YOUR_API_KEY}&point.lat=48.858268&point.lon=2.294471&layers=locality)
***TO DO: Add correct link**** For more information on what the different layers mean, see [this link](http://layers link).
***TO DO: Add correct link*** For more information on what the different layers mean, see [this link](http://layers link).
### Filter by country

8
search.md

@ -8,7 +8,7 @@ Making the leap from text to coordinates is an intricate and challenging process
All Mapzen Search requests share the same format:
```
```
https://search.mapzen.com/v1/search?text=London&api_key=search-xxxxxx
\___/ \_______________/\__/\_____/\__________/\___________________/
| | / | | |
@ -109,11 +109,11 @@ Results in the United States:
![](/getting-started/images/world_rect.png)
To specify the boundary using a rectangle, you need latitude, longitude coordinates for two diagonals of the bounding box (the mininum and the maximum latitude, longitude).
To specify the boundary using a rectangle, you need latitude, longitude coordinates for two diagonals of the bounding box (the minimum and the maximum latitude, longitude).
For example, to find a YMCA within the state of Texas, you can set the `boundary.rect.*` parameter to values representing the bounding box around Texas: min_lon=-106.65 min_lat=25.84 max_lon=-93.51 max_lat=36.5
Tip: You can look up a bounding box for a known region with this [web tool](http://boundingbox.klokantech.com/)*
Tip: You can look up a bounding box for a known region with this [web tool](http://boundingbox.klokantech.com/)
[/v1/search?api_key=search-XXXXXXX&text=YMCA&___boundary.rect.min_lat=25.84&boundary.rect.min_lon=-106.65&boundary.rect.max_lat=36.5&boundary.rect.max_lon=-93.51___](https://search.mapzen.com/v1/search?api_key=search-XXXXXXX&text=YMCA&boundary.rect.min_lat=25.84&boundary.rect.min_lon=-106.65&boundary.rect.max_lat=36.5&boundary.rect.max_lon=-93.51)
@ -179,7 +179,7 @@ Many use cases call for the ability to promote nearby results to the top of the
By specifying a `focus.point`, nearby places will be scored higher depending on how close they are to the `focus.point` so that places with higher scores will appear higher in the results list. The effect of this scoring boost diminishes to zero after 100 kilometers away from the `focus.point`. After all the nearby results have been found, additional results will come from the rest of the world, without any further location-based prioritization.
To find YMCA again, but this time near the a specific coordinate location (representing the Sydney Opera House) in Sydney, Australia.
To find YMCA again, but this time near a specific coordinate location (representing the Sydney Opera House) in Sydney, Australia, use `focus.point`.
> [/v1/search?api_key=search-XXXXXXX&text=YMCA&___focus.point.lat=-33.856680&focus.point.lon=151.215281___](https://search.mapzen.com/v1/search?api_key=search-XXXXXXX&text=YMCA&focus.point.lat=-33.856680&focus.point.lon=151.215281)

4
transition-from-beta.md

@ -171,7 +171,7 @@ https://search.mapzen.com/v1/place?ids=geonames:3544:adm1:fr:fra:paris&api_key=s
```
# In-Browser Cross-Site Scripting
If you were using Pelias from within a browser with client-side javascript (using Pelias on a domain that is different mapzen.com), you should know that Mapzen Search does not support JSONP requests to get around cross-site scripting limitations.
If you were using Pelias from within a browser with client-side Javascript (using Pelias on a domain that is different mapzen.com), you should know that Mapzen Search does not support JSONP requests to get around cross-site scripting limitations.
Instead, Mapzen Search supports [Cross-Origin Resource Sharing](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS) (CORS), which enables secure cross-site data transfers.
@ -188,4 +188,4 @@ Let us know.
Words go to: [search@mapzen.com](mailto:search@mapzen.com)
Issues go to [Github](https://github.com/pelias/pelias-doc/issues)
Issues go to [GitHub](https://github.com/pelias/pelias-doc/issues)

Loading…
Cancel
Save