Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Geocoder place types#26

Merged
sgillies merged 4 commits intomasterfrom
geocoder-place-types
Sep 9, 2015
Merged

Geocoder place types#26
sgillies merged 4 commits intomasterfrom
geocoder-place-types

Conversation

@sgillies
Copy link
Copy Markdown
Contributor

@sgillies sgillies commented Sep 9, 2015

Add place type filtering and proximity biasing.

In the API, these are new keyword arguments to the forward() and reverse() methods. To side step coordinate order confusion, I've made lng and lat separate keywords. They can be given in either order.

Are results returned sorted by proximity to the given lng, lat? That would be a useful fact to convey to users.

Closes #11
Closes #12

@sgillies sgillies added this to the 0.1 milestone Sep 9, 2015
@sgillies
Copy link
Copy Markdown
Contributor Author

sgillies commented Sep 9, 2015

@sbma44 how does this look to you? Place type filtering is like

geocoder.forward(address, place_types=('address', 'poi'))

and proximity

geocoder.forward(address, lng=0, lat=0)

Geocoding support is complete.

Conflicts:
	mapbox/scripts/geocoder.py
@sbma44
Copy link
Copy Markdown
Member

sbma44 commented Sep 9, 2015

I would suggest changing place_types to just types. One of the place_types is place, which would be confusing. Otherwise, looks great!

sgillies added a commit that referenced this pull request Sep 9, 2015
@sgillies sgillies merged commit be8e0c8 into master Sep 9, 2015
@sgillies sgillies deleted the geocoder-place-types branch September 9, 2015 15:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants