Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@pratheekrebala
Copy link
Contributor

@pratheekrebala pratheekrebala commented Mar 16, 2020

Small addition to create support for the non-free MapQuest API. It's mostly copied from the Mapbox provider with slight changes to fit the Mapquest API (documented here)

Copy link
Member

@KostyaEsmukov KostyaEsmukov left a comment

Choose a reason for hiding this comment

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

There's already a geocoder class which supports MapQuest: https://github.com/geopy/geopy/blob/master/geopy/geocoders/openmapquest.py

Having two different classes for the same provider looks quite confusing. However, the following document clears things up to me: https://developer.mapquest.com/documentation/open/nominatim-search/ : MapQuest provide two different APIs with different data. Could you please mention that document in docstrings of both classes and cross-link the classes, so it would be clear from the docs which class one should use for MapQuest?

Also, could you please add tests for this new class?

@KostyaEsmukov
Copy link
Member

Small addition to create support for the non-free MapQuest API. It's mostly copied from the Mapbox provider with slight changes to fit the Mapquest API (documented here)

This sentence is very confusing:

  1. Does MapQuest use Mapbox-alike API (like OpenMapQuest uses Nominatim)? Or did you mean that you just chose MapBox as a skeleton for creating a new geocoding class (completely unrelated to MapBox)?
  2. The "here" documentation link leads to Google, looks like it should've been https://developer.mapquest.com/documentation/geocoding-api/

@pratheekrebala
Copy link
Contributor Author

pratheekrebala commented May 5, 2020

Small addition to create support for the non-free MapQuest API. It's mostly copied from the Mapbox provider with slight changes to fit the Mapquest API (documented here)

This sentence is very confusing:

  1. Does MapQuest use Mapbox-alike API (like OpenMapQuest uses Nominatim)? Or did you mean that you just chose MapBox as a skeleton for creating a new geocoding class (completely unrelated to MapBox)?

Sorry about the confusion. Your interpretation is correct: I used the MapBox class as a skeleton to generate the non-free Mapquest class.

  1. The "here" documentation link leads to Google, looks like it should've been https://developer.mapquest.com/documentation/geocoding-api/

That's also the correct link to the documentation. I've updated my initial PR to point to the correct link.

@pratheekrebala pratheekrebala changed the title Add support for MapQuest. Add support for non-free MapQuest. API May 5, 2020
@pratheekrebala pratheekrebala changed the title Add support for non-free MapQuest. API Add support for non-free MapQuest API May 5, 2020
@pratheekrebala
Copy link
Contributor Author

I think I have fixed all the changes you have requested and added tests to test/geocoders/mapquest.py. I ensured that the tests were passing on my local machine using my MapQuest key.

Let me know if you need a key to add to the CI.

Thank you for taking the time to review this PR!

@KostyaEsmukov KostyaEsmukov added this to the 1.22 milestone May 9, 2020
Copy link
Member

@KostyaEsmukov KostyaEsmukov left a comment

Choose a reason for hiding this comment

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

Thank you for the changes!

I'm merging this, but going to make some little changes on top in master.

I tested locally with the already existing OPENMAPQUEST_APIKEY value and it worked fine, so I don't need a key, thanks.

@KostyaEsmukov KostyaEsmukov merged commit a049b4b into geopy:master May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants