Displaying a fictitious/notional map on the globe and forcing the camera to view the map

I have a feature to display a notional map and to force the user to keep the map in the view. I’ve got a few questions based upon my knowledge of Cesium, but at this point I’m really looking for any suggestions on how accomplish this feature. I’m currently planning on displaying the map on the globe over the ocean(due to terrain issues, which are on our side in our DB) and then forcing the camera within the bounds of the image.

Question: 2D vs 3D The maps size is roughly 2740km x 2000km, so a simple 2D view would really be best. Judging from the SceneMode.SCENE2D implementation there’s an assumption that the entire globe is present and with good reason. Is there anyway to use the 2D mode and display only a portion of the globe? Or is this the same issue with locking the camera into the bounds of the image?

Question: Is there anyway to bound the camera to a range of lat and longs? I see that the ScreenSpaceCameraController has a zoom min and max, so that will be handy, since our map doesn’t really have levels of detail. I’m looking for a translation min and max. I was planning on disabling tilt and force the user into a top down only view.

Question: I’m currently loading the map with a kml GroundOverlay, and we’re having some visibility issues with kml, billboards, polylines, and polygons. I know this has to change, and I was wondering if I should to create my own ImageryProvider or if a ImageryLayer would suffice?



Hi Scott,

There isn’t currently a way to restrict the camera to a certain bounds. However, this was something other users requested and we have an issue written up here: https://github.com/AnalyticalGraphicsInc/cesium/issues/4802

And for your ground overlay, if you’re seeing z-fighting issues, switching to a SingleTileImageryProvider instead should fix the problem.