We have a system that captures touches from an external source and then dispatches them to a Cesium viewer to manipulate the map. The touches are dispatched after a synthetic pointer event is created with new PointerEvent()
. When the new event is dispatched to the viewer, Cesium calls setPointerCapture
on pointerdown
events – in Chrome, this throws an error (“No active pointer with the given id is found”), since (we think…) the event was not organically created by a mouse click or touch, but from instantiating PointerEvent().
What do think is the best way to avoid this error? We’d like the external touches to execute a zoom feature that’s already built-in. Do you think we should reroute the PointerEvent and rebuild the zoom functionality using Camera.zoomIn/zoomOut?
HI @rdkelley8,
Thanks for your post and welcome to the Cesium community.
Based on the information you provided, I think the problem you identified regarding Cesium not handling the pointer events in Chrome would require some investigation as a possible bug. Would you mind creating an issue in the Cesium repo with the information you provided above and any additional information that would be helpful? GitHub · Where software is built It would also be very helpful for investigating and debugging if you could provide sample code reproducing the issue in our sandcastle tool https://sandcastle.cesium.com/.
Because this issue requires investigation, if it is not too difficult based on the desired behavior of your feature I think the solution you proposed to reroute the PointerEvent and rebuild the zoom functionality using Camera.zoomIn/zoomOut would be a good path forward.
Please let us know about creating an issue in the Cesium repo and if you have further questions.
Best,
Luke
Thank you, Luke. I’ll try to reproduce in a sandbox and open up an issue.