From 2bff68065d5b44ad3183e08f3df8636c053ee64e Mon Sep 17 00:00:00 2001 From: Diana Shkolnikov Date: Thu, 17 Sep 2015 11:08:25 -0400 Subject: [PATCH] Update 002-search.md --- getting-started/002-search.md | 36 +++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/getting-started/002-search.md b/getting-started/002-search.md index d759eeb..9f21482 100644 --- a/getting-started/002-search.md +++ b/getting-started/002-search.md @@ -10,7 +10,7 @@ Geocoding is the process of matching an address to its corresponding geographic ## Looking For Places - Getting Started _{search text, global, no options}_ -#### The most basic scenario +### The most basic scenario Let's say you wanted to find **Stinky Beach**, you would simply query the search API as follows: @@ -32,7 +32,7 @@ See for yourself: > [/v1/search?api_key={YOUR-KEY}&___text=YANKEE STADIUM___](https://search.mapzen.com/v1/search?api_key={YOUR_API_KEY}&text=YANKEE STADIUM) -#### Results +### Results Now that you've seen some examples of search, let's examine the results closer. When requesting search results you will always get back `GeoJSON` results, unless something goes terribly wrong, in which case you'll get a really helpful error. @@ -108,18 +108,38 @@ That's the _default_ number of results the API will return, unless otherwise spe > [/v1/search?text=stinky beach&___size=25___](https://pelias.bigdev.mapzen.com/v1/search?api_key={YOUR_API_KEY}&text=stinky beach&size=25) +### Narrowing your Search + +All this time you've been searching the entire world... + +![](https://github.com/dianashk/pelias-doc/blob/master/getting-started/world_all.png) + +#### What if you need results from only... + +Sometimes it's necessary to limit the search to a region of the world. This can be useful if you're looking for places in a particular region, or country, or only want to look in the immediate viscinity of a user with a known location. Different usecases call for different specifications of this bounding region. We currently support three types: rectangle, circle, and country. + +#### ...rectangular region + +![](https://github.com/dianashk/pelias-doc/blob/master/getting-started/world_rect.png) +#### ...circular region + +![](https://github.com/dianashk/pelias-doc/blob/master/getting-started/world_circle.png) - - - - -## Looking in a Particular Place (Using Boundaries) -[Means to limit the scope of where you're looking, and to look only within a particular area. This can be useful if you're looking for places in a particular region, or country, or only want to look in the immediate viscinity of a user with a known location.] +#### ...specific country + +![](https://github.com/dianashk/pelias-doc/blob/master/getting-started/world_country.png) + + + + + +# TBD + Boundaries are mutually exclusive - Country (country code)