baseLayerPicker set to false effects picking demo

**I was playing with the code on the Sandcastle demo Drawing On Terrain and noticed if I turned off the attribute **baseLayerPicker which I thought just hides the imagery widget.

**It will effect the mouse position picking code giving a wrong position. Is this a bug? **


var viewer = new Cesium.Viewer(‘cesiumContainer’, {

selectionIndicator : false,

baseLayerPicker : false,

infoBox : false,

terrainProvider : Cesium.createWorldTerrain()


Hey Alan,

Thanks for reporting this. This does sound like a bug, which I’ve opened an issue for:

It looks like replacing:

var earthPosition = viewer.scene.pickPosition(event.position);



var ray =;

var earthPosition = viewer.scene.globe.pick(ray, viewer.scene);


fixes it.

Thank you Omar for raising this issue. It is always interesting to read the history behind decisions.
This also fixes a similar issue when the sceneMode is changed to SCENE2D