geocoder-php / Geocoder

The most featured Geocoder library written in PHP.
https://geocoder-php.org
MIT License
3.94k stars 515 forks source link

Adding timezone functionally to google maps/bing maps #961

Closed atymic closed 5 years ago

atymic commented 5 years ago

Hi :smile:

I'm using your library in a couple of projects, and it's awesome! One issue I've had is that neither the google maps, or bing maps providers support timezones. This is because a different API request is required for each service to get timezone data.

I was wondering, would you be open to adding a config option to these providers such that you can (optionally) enable timezone coding (and therefore the extra request)?

I'd be happy to create a PR if you think it sounds like a good idea :+1:

jbelien commented 5 years ago

Yes, of course, we would be more than happy to add this if can submit a PR ! 🎉

Could you give us some documentation links about this ?

atymic commented 5 years ago

Here's the bing maps API: https://docs.microsoft.com/en-us/bingmaps/rest-services/timezone/ And the google maps API: https://developers.google.com/maps/documentation/timezone/intro

jbelien commented 5 years ago

Oh okay, I understand now.

I think it's out of the scope of this project (focus on geocoding and reverse geocoding). But maybe @willdurand and @Nyholm will disagree ?

atymic commented 5 years ago

Sorry to bother @Nyholm but I was wondering what your thoughts would be? Thanks :)

Nyholm commented 5 years ago

It seams like it is a different API and as we currently dont have any interfaces for it I suggest that we not include it here.

I agree with @jbelien

atymic commented 5 years ago

Ok, no worries. All good!

didix16 commented 3 years ago

Hi, I was wondering why adding timezone is out of scope from this project?

I mean, Geocoder has the Address class which has the timezone property and GoogleAddress extends from that Address. So why not add the Google Maps API Timezone to get the timezone? Is it so hard to develop it?

Thanks in advance