Open J-Gonzalez opened 3 years ago
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 https://github.com/capacitor-community/capacitor-googlemaps-native/pull/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: