Removing background map

I am planning on creating all vector layers within CesiumJS without using any of the base background maps. Is there a way of turning the base off? I tried to do this but it always defaults to Bing maps base layer.

Marc Aubanel

To remove all imagery, you can all

viewer.scene.imageryLayers.removeAll();

Once you do that you’ll have a bright blue globe. You can choose the color by setting the globe’s baseColor

viewer.scene.globe.baseColor = Cesium.Color.BLACK;

Thanks works, like a charm…

Maybe I spoke too soon. The globe doesn't render but setting the base color does not change the color of the globe. It stays blue. I printed the value for viewer.scene.globe.baseColor and the value is set correctly but just not rendered on screen.

Marc Aubanel

What version of Cesium are you using? baseColor was added in 1.2 (released on Oct 1st).

Does it work if you paste the below three lines into Sandcastle (http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Hello%20World.html)?

var viewer = new Cesium.Viewer(‘cesiumContainer’);

viewer.scene.imageryLayers.removeAll();

viewer.scene.globe.baseColor = Cesium.Color.BLACK;

I am using 1.2. Funny it does work in Sandcastle. Let me look into this a bit more.

MarcA

I removed everything and am using the Hello World start up HTML with these three lines. It still renders as blue and ignores the baseColor.

MarcA

OK, it works on my external server but not on my local one on my mac. Strange….

MarcA

Try clearing your browser cache. The default configuration for web servers sometimes is configured to cache files permanently, which means that your browser may still be using a cached version of Cesium from before the baseColor property was added.