Removing background map

1,789 views
Skip to first unread message

vancou...@gmail.com

unread,
Oct 11, 2014, 1:44:33 PM10/11/14
to cesiu...@googlegroups.com
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

Matthew Amato

unread,
Oct 11, 2014, 1:56:57 PM10/11/14
to cesiu...@googlegroups.com
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;

On Sat, Oct 11, 2014 at 1:44 PM, <vancou...@gmail.com> wrote:
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

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marc GMail

unread,
Oct 11, 2014, 1:59:05 PM10/11/14
to cesiu...@googlegroups.com
Thanks works, like a charm...
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/kGGpOtGluwU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

vancou...@gmail.com

unread,
Oct 11, 2014, 2:15:30 PM10/11/14
to cesiu...@googlegroups.com
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

Matthew Amato

unread,
Oct 11, 2014, 2:31:47 PM10/11/14
to cesiu...@googlegroups.com
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;

On Sat, Oct 11, 2014 at 2:15 PM, <vancou...@gmail.com> wrote:
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

Marc GMail

unread,
Oct 11, 2014, 2:45:33 PM10/11/14
to cesiu...@googlegroups.com
I am using 1.2.  Funny it does work in Sandcastle.  Let me look into this a bit more.

MarcA
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/kGGpOtGluwU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Marc GMail

unread,
Oct 11, 2014, 2:53:38 PM10/11/14
to cesiu...@googlegroups.com
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
On Oct 11, 2014, at 1:31 PM, Matthew Amato <matt....@gmail.com> wrote:

Marc GMail

unread,
Oct 11, 2014, 3:05:23 PM10/11/14
to cesiu...@googlegroups.com
OK, it works on my external server but not on my local one on my mac.  Strange….

MarcA

Scott Hunter

unread,
Oct 13, 2014, 3:46:55 PM10/13/14
to cesiu...@googlegroups.com
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.

Reply all
Reply to author
Forward
0 new messages