Skip to content

Add support for Mapzen's Geocoder #531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 29, 2016

Conversation

vicchi
Copy link
Member

@vicchi vicchi commented Sep 12, 2016

This PR depends on the serialisation fix in PR #530 in order for the new provider's unit test cache files to be written correctly and for the unit tests to be repeatable, based on those cached files.

@Nyholm
Copy link
Member

Nyholm commented Sep 12, 2016

Awesome @vicchi!

Im 👍 but I do not know about the Mapzen service. I've reviewed this PR from the general providers' point of view.

/**
* @author Gary Gale <[email protected]>
*/
class Mapzen extends AbstractHttpProvider
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to finalize this class.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true; it probably does. However when I wrote this I used the existing provider implementations as examples of best practice and as far as I can see, none of these finalise their classes. Not that's not a good reason not to do this, but I would have thought it would make more sense to apply finalisation across the board, rather than have a single provider finalise and none of the others doing so.

Thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have thought it would make more sense to apply finalisation across the board, rather than have a single provider finalise and none of the others doing so

definitely yes!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just opened a new issue (#537) so we track adding finalisation to all providers. But I'm also assuming that based on @willdurand's comment above, there's nothing stopping this PR from being merged now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am +1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far this is the only provider without final keyword.

@vicchi
Copy link
Member Author

vicchi commented Sep 29, 2016

@willdurand - can this PR be merged now? I want to start working on the testing with encrypted provider API keys/credentials, but would prefer to have Mapzen tested as part of this.

@willdurand willdurand merged commit 87a0f6d into geocoder-php:master Sep 29, 2016
@willdurand
Copy link
Member

thanks @vicchi!

@vicchi
Copy link
Member Author

vicchi commented Sep 29, 2016

Thanks!

@stevevance
Copy link
Contributor

Thank you for writing what I could not!
I'm going to test this, too. I prefer Mapzen Search because they aggregate results from OpenAddresses, OpenStreetMap, and Geonames.

@stevevance
Copy link
Contributor

stevevance commented Apr 29, 2017

@vicchi I tested this finally and I got one unexpected result: the adminLevel number 2 returned the address's state in the USA.

On the other providers that I use (ArcGISOnline, Bing, Nominatim) the adminLevel number 2 always returned the address's county.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants