[GIS] How do get North, East, South, or West bounds from Cesium map

cesium

I see that there is an option that allows for one to set the view if you provide the coordinates for these bounds, but nowhere in the documentation do I see anything pertaining to retrieving these values as defined by the canvas container / rectangle.

Best Answer

The current view bounds can be calculated by Camera.computeViewRectangle. Note that the results here can be approximate, due to the complexity of a perspective 3D view of the globe.

For details on that, see Cesium 3D - Determining the Map Scale of the viewed Globe.