How to prevent a GMSMapView from infinite scrolling with inertia?

115 Views Asked by At

Similar questions have been asked before but I want the restriction to work "smooth", e.g. when you have a horizontal and a vertical panning vector (e.g. you pan the map side and upwards), the map should not just stop at the first encounter of the restriction bounding box and stop all movements.

I imagine that you should be able to generously pan "inside" that bounding box and the inertia of all map panning should be kept. The component (lat/long) that hits a "barrier" should be bouncing back and the other component should scroll further until the scrolling momentum is finished.

How would I go about implementing such a function?

0

There are 0 best solutions below