MapControls // Limit controls

Hi,

I have a working mapControl, but I can move the view outside of the Plane.
What I want to do is to set the maximum Size if the Plane (bigger than the view) and limit the Camera/MapControls to the boundaries of the Plane.

How can I do that?

Thank in advance and many greetings
Kaos

Your issue is essentially a duplicate of: How to limit pan in OrbitControls for OrthographicCamera?

The solution also works with MapControls: https://jsfiddle.net/zogruew9/

1 Like