elodie icon indicating copy to clipboard operation
elodie copied to clipboard

Use Google API for location

Open navaneeth opened this issue 8 years ago • 5 comments

Great work on elodie. Just loving it.

However, I am having a bit of issues with the location. In the config.ini, I have told elodie to name my directories like %city, %state.

This works well when major city names are used. A working eg:

./elodie.py update --location=Bangalore

My directories will be named like, Bangalore, Karnataka.

But when I set more accurate location, the API is unable to get it. Eg:

./elodie.py update --location=Koramangala

In this case, the directories are named as Karnataka. But the actual image has Koramangala as the location.

To me, this looks like a limitation of Mapquest API.

How about using Google Maps API, which is much more detailed. I am referring to https://maps.googleapis.com/maps/api/geocode/json. Google maps also has a free API version available like Mapquest.

If this sounds alright, I can work on it and send you a PR.

navaneeth avatar Nov 24 '17 10:11 navaneeth

Thanks for opening the issue. I've had similar problems :).

A PR would be great. Do you happen to know what Google's TOS are for using their API? I recall some required that you need to use the results to plot points on a Google Map.

For a PR, I would suggest adding a [GoogleMaps] section to the config and somehow overloading the functions in geolocation.py. Keep in mind that we'll want to have tests continue to pass and add tests for any new classes or functions.

jmathai avatar Nov 26 '17 05:11 jmathai

I couldn't see any relevant section in the Maps API TOS about the kind of usage which elodie will have. Do you see it somewhere?

navaneeth avatar Nov 26 '17 13:11 navaneeth

Looks like there are free tiers depending on the API being used. elodie should qualify for free and public.

https://developers.google.com/maps/pricing-and-plans/#details

jmathai avatar Nov 26 '17 16:11 jmathai

FYI

I tried to login to my mapquest (owned by verizon, yuk) account today and it seems to have been deleted?!

I only use the account for elodie and haven't done any elodie stuff for a while but deleting my account without warning seems a bit shitty

I'm no google fan but I'm supporting this

Aside, using [o]penstreetmap.org would be cool, it's FOSS after-all - is that possible?

Regards

👋 https://github.com/jmathai/elodie/issues/45

o: http://openstreetmap.org

ldexterldesign avatar Mar 25 '20 01:03 ldexterldesign

Sorry to bring up an old thread but did this ever come to fruition mapquest doesn’t like the area I’m from and tends to place all locations around me as just England instead of area this would be useful.

NEprod avatar Jul 17 '20 08:07 NEprod