GoogleGeolocationBundle icon indicating copy to clipboard operation
GoogleGeolocationBundle copied to clipboard

Adding extra parameters for the service

Open byhoratiss opened this issue 11 years ago • 3 comments

I need to add others parameters to the geocoding service, as explained in the documentation, like "region", "language", etc. https://developers.google.com/maps/documentation/geocoding/?hl=en#Geocoding

The code actually does not provide a method for this, as shows in the code: https://github.com/dsyph3r/GoogleGeolocationBundle/blob/master/Geolocation/GeolocationApi.php#L254

I realize that the only choice i have to achieve this would be to override the "%google_geolocation.geolocation_api.class%" parameter, create my own class and extend the "Google\GeolocationBundle\Geolocation\GeolocationApi".

There is another elegant way of doing this?

Thanks!

byhoratiss avatar Jun 28 '13 19:06 byhoratiss

Hey, you could always code the feature and submit a PR :)

dsyph3r avatar Jun 28 '13 22:06 dsyph3r

Any hint of how to implement?

byhoratiss avatar Jul 01 '13 00:07 byhoratiss

@dsyph3r Could you please check this commit? https://github.com/byhoratiss/GoogleGeolocationBundle/commit/47e96c32620a71c27fe79347e053d2b10d9e756a

byhoratiss avatar Jul 05 '13 19:07 byhoratiss