Hi,
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?
Thanks,
Gowtham.
Hi,
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?
Thanks,
Gowtham.
Hello Gowtham,
We have events for detecting when the camera moves. See Camera.moveStart and Camera.moveEnd: http://cesiumjs.org/Cesium/Build/Documentation/Camera.html#moveEnd
See this demo for how to use the events: http://analyticalgraphicsinc.github.io/cesium-google-earth-examples/examples/viewchangeEvent.html
Best,
Hannah
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?
Thanks,
Gowtham.
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.
-Hannah