Open matteblair opened 5 years ago
For comparison, the Mapbox iOS SDK provides a very general delegate function to solve this:
- (BOOL)mapView:(nonnull MGLMapView *)mapView
shouldChangeFromCamera:(nonnull MGLMapCamera *)oldCamera
toCamera:(nonnull MGLMapCamera *)newCamera;
Whereas the Google Maps Android SDK has a more explicit function:
public void setLatLngBoundsForCameraTarget (LatLngBounds bounds)
in osmdroid their is feature that limit scrollable area how i can implement that using tangram sdk or it's not possible for now ?
There still isn't built-in support for this in Tangram ES. The best you can do for now is intercept panning events with a PanResponder
and restrict movement from there.
For some applications it is useful to allow users some degree of movement within the map, but to restrict that movement within some bounds. This could be a latitude/longitude range, a zoom range, or something else entirely. This is the need described in #1962 and #1431. This issue will track this need as a feature enhancement.