-
Notifications
You must be signed in to change notification settings - Fork 63
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
Get LatLng bounds of mapview (NE/SE/NW/SW) #72
Comments
Hey @J-Gonzalez , sounds good to me. I'm inclined towards the getBounds function approach as it seems straightforward to implement. Would you like to send a PR for this? You've the iOS parts figured out already and android seems similar. |
Definitely would love to see this feature implemented as it's something we need on more then one of our projects. |
Opened up PR #81 that creates this functionality via a viewBounds() function. |
Hello @hemangsk it looks like this enhancement exists on the v1 branch so it's not showing up when installing via npm which I imagine is pointing to the main branch. Is this enhancement working? If so, is there a plan to merge into the main branch? Working on a project currently that requires this capability. Thank you! UPDATE: I just submitted a PR #171 with a modified version of @J-Gonzalez 's code so this can be merged into main |
Is your feature request related to a problem? Please describe.
Corner bounds are extremely useful when needing to query the viewport to get points within the view.
Does this feature exist in the Google Maps SDK for android and iOS? Please link the documentation for this feature.
Yes, using "visible region"
https://developers.google.com/maps/documentation/android-sdk/reference/com/google/android/libraries/maps/model/VisibleRegion?hl=en
Describe the solution you'd like
Either a getBounds function, or a way for all map events, such as on "didChange" to return bounds in addition to zoom level and center point lat/lng.
Additional context
Example swift code on didChange event that gets this data:
The text was updated successfully, but these errors were encountered: