Skip to content

Commit

Permalink
Merge 0d2a83a into 2f200c6
Browse files Browse the repository at this point in the history
  • Loading branch information
avanderm committed Jan 18, 2018
2 parents 2f200c6 + 0d2a83a commit 0006fe5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/providers/TomTom.rst
Expand Up @@ -24,7 +24,7 @@ Command Line Interface

.. code-block:: bash
$ geocode 'San Francisco, CA' --provider mapbox --out geojson
$ geocode 'San Francisco, CA' --provider tomtom --out geojson
Environment Variables
---------------------
Expand All @@ -39,13 +39,17 @@ Parameters
----------

- `location`: Your search location you want geocoded.
- `key`: use your own API Key from TomTom.
- `key`: Use your own API Key from TomTom.
- `maxRows`: (default=1) Max number of results to fetch
- `countrySet`: Comma separated string of country codes (e.g. FR,ES). This will limit the search to the specified countries
- `lon`: Longitude e.g. lon=-121.89 lat./lon. where results should be biased (supplying a lat./lon. without a radius will only bias the search results to that area)
- `lat`: Latitude e.g.lat=37.337 lat./lon. where results should be biased (supplying a lat./lon. without a radius will only bias the search results to that area)
- `radius`: If radius and position are set, the results will be constrained to the defined area. The radius parameter is specified in meters.
- `method`: (default=geocode) Use the following:

- geocode

References
----------

- `TomTom Geocoding API <http://developer.tomtom.com/products/geocoding_api>`_
- `TomTom Geocoding API <https://developer.tomtom.com/online-search/online-search-documentation-geocoding/geocode>`
4 changes: 4 additions & 0 deletions geocoder/tomtom.py
Expand Up @@ -101,6 +101,10 @@ def _build_params(self, location, provider_key, **kwargs):
return {
'key': provider_key,
'limit': kwargs.get('maxRows', 1),
'countrySet': kwargs.get('countrySet'),
'lon': kwargs.get('lon'),
'lat': kwargs.get('lat'),
'radius': kwargs.get('radius')
}

def _before_initialize(self, location, **kwargs):
Expand Down

0 comments on commit 0006fe5

Please sign in to comment.