Is there any way to restrict the view in customize region

The region could be set by latitude and longitude.
Is there any way ?

Thanks!

Hello,

This is not something currently included in Cesium. However, I have seen a few other users request this so I’ve written up an issue here for us to consider: https://github.com/AnalyticalGraphicsInc/cesium/issues/4802

Best,

Hannah

Good question/issue.
I’ve been wondering how to do this myself, and it’s on my list of future functions to write for Cesium.

As a software developer, I get excited about using every bell and whistle in a 3D map application - but most maps have a specific purpose and limited audience. Navigating a 3D globe can immediately overwhelm and distract a user from the specific information a map needs to communicate. A simple base map, and user interface with few controls, and a restricted ability to pan or zoom beyond an area-of-interest, focuses the viewer’s attention on the datasources I want them to look at. Personally, I hate that - I want an interactive map for 3D visualization, with a hundred custom datasources and dozens of controls… but that’s just me.

I had a way to do this in Google Map, and I suspect the logic would be similar for Cesium out-of-the-box, but I haven’t looked into whether CesiumJS, or the HTML5 DOM and canvas, already expose the necessary view properties. I suspect that if I had a better-understanding of frustrums, I’d be able to use the existing Cesium camera functions to accomplish this. Here’s a code snippet of my approach to this in Google map:

myGoogleMap = new google.maps.Map(document.getElementById(divContainer), myOptions);
myBounds = myGoogleMap.getBounds(); //returns undefined when map is first initializing

google.maps.event.addListener(myGoogleMap, ‘idle’, function() {

var newBounds = myGoogleMap.getBounds();

if(myBounds != undefined){

console.log(“myBounds is not undefined”);

if(!(myBounds.intersects(newBounds))){

 myGoogleMap.setCenter(latlng);

 myGoogleMap.setZoom(lftgly_map.zoom)};

}else{

 myBounds = myGoogleMap.getBounds(); //RETURNS CORRECT VALUE AFTER FIRST PAN OR ZOOM

 //console.log("mwacBounds was undefined"); THIS GETS SET ON THE FIRST PAN OR ZOOM

};
/** logging messages to console for debugging purposes

console.log('North East: ’ +

	mwacBounds.getNorthEast().lat() + ' ' +

	mwacBounds.getNorthEast().lng());

console.log('South West: ’ +

	mwacBounds.getSouthWest().lat() + ' ' +

	mwacBounds.getSouthWest().lng()); */

});

``

Cool! Thanks for your quick response:-)

great! looks quite clear, I will try this later.Thanks for your help.