Skip to content
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

feat(googlemaps): support bounds in Geocoder #599

Merged
merged 1 commit into from
Sep 29, 2016

Conversation

zoehneto
Copy link
Contributor

When using the Geocoder.geocode method, the area can be restricted to a rectangle using the bounds array. This array is optional and can contain two LatLng objects. The first LatLng specifies the lower left corner, the second LatLng specifies the upper right corner.

See:
Implementation in the plugin
[Android developer docs for the used method](https://developer.android.com/reference/android/location/Geocoder.html#getFromLocationName%28java.lang.String, int, double, double, double, double%29)

@ihadeed
Copy link
Collaborator

ihadeed commented Sep 28, 2016

Are you sure the correct type is GoogleMapsLatLng[] and not GoogleMapsLatLngBounds ?

Can't find any docs related to that, I'm just guessing here.

@zoehneto
Copy link
Contributor Author

Yes, internally this is converted to JSON and then the lat and leg properties of the object are read (I tested this change in a personal project and it works there).

@ihadeed
Copy link
Collaborator

ihadeed commented Sep 28, 2016

Alright thanks, will merge soon

On Sep 28, 2016 1:59 PM, "Tom Zöhner" [email protected] wrote:

Yes, internally this is converted to JSON and then the lat and leg
properties of the object are read (I tested this change in a personal
project and it works there).


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#599 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANJ8dE9KNGFzMei2yGXVWqmUfEZdTk1-ks5quqsbgaJpZM4KIxj0
.

@ihadeed ihadeed merged commit 66e9e46 into danielsogl:master Sep 29, 2016
@martyan
Copy link

martyan commented Oct 21, 2016

Hi Folks, is it possible to return bounds in the GeocoderResult as well?

This would be useful e.g. when you're looking for 'Amsterdam' and want to zoom to it, but you can't determine the correct zoom because you only got the GoogleMapsLatLng.

Cheers!

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.

3 participants