-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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:
public func mapView(_ mapView: GMSMapView, didChange position: GMSCameraPosition) {
self.notifyListeners("didChange", data: ["result": [
"position": [
"latitude": position.target.latitude,
"longitude": position.target.longitude
],
"bounds":[
"farLeft": [
"latitude": mapView.projection.visibleRegion().farLeft.latitude,
"longitude": mapView.projection.visibleRegion().farLeft.longitude,
],
"farRight":[
"latitude": mapView.projection.visibleRegion().nearRight.latitude,
"longitude": mapView.projection.visibleRegion().nearRight.longitude,
]
],
"zoom": position.zoom,
]])
}selected-pixel-jameson and hemangsk
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request