How to check map pan?


I need help in checking whether the map is panned or not. Is there any method , property or event in camera API to check this?



Hello Gowtham,

We have events for detecting when the camera moves. See Camera.moveStart and Camera.moveEnd:

See this demo for how to use the events:



Hi Hannah,

Thanks for the reply. As per my understanding moveStart and moveEnd fires for both map zoom and pan operations.

I need to distinguish between pan and zoom. Could you please help me on this?



There isn’t anything built into Cesium to handle this, but you might be able to accomplish it by listening to different mouse events. You can see if it was a left click or a right click, and only do something when a left drag was used.