cesium-drawhelper
cesium-drawhelper copied to clipboard
Zoom to created object
I want to zoom in on objects created by the ' DrawHelper ' . I managed to do with the rectangle by : oViewer.camera.flyTo({ destination : new Cesium.Rectangle(oTargetEntity.getExtent().west, oTargetEntity.getExtent().south, oTargetEntity.getExtent().east, oTargetEntity.getExtent().north) }); with 'oTargetEntity' is the object returned after drawing he object.
But for other things, I was not able to recover their limits below to zoom (polygon, circle, line).
Hi, sorry for the delay. I don't provide bound calculations out of the box for those shapes but you can easily calculate them looping through the shapes' coordinates.