I have several WMS layer in geoserver that I want to add them into cesium globe
but I want to add them on cesium viewer ( I have bingmaps key)
can anyone help me to solve this?
Thanks
I have several WMS layer in geoserver that I want to add them into cesium globe
but I want to add them on cesium viewer ( I have bingmaps key)
can anyone help me to solve this?
Thanks
Have a look at the Sandcastle demos, in particular âImagery Layersâ (http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Imagery%20Layers.html&label=Showcases) and âImagery Layer Manipulationâ. While this example uses a CesiumWidget, little changes when using the Viewer widget:
var viewer = new Cesium.Viewer(âcesiumContainerâ);
var layers = viewer.scene.imageryLayers;
Alex
I see, thanks for that sirâŚ
But sir, I want to add more than one WMS layer on the globe
and btw this example doesnât work
the firebug wrote : TypeError: widget.centralBody.getImageryLayers is not a function
when I use your example : var layers = viewer.scene.imageryLayers;
firebug detected : TypeError: layers is undefined
Alex
I see, thanks for that sirâŚ
But sir, I want to add more than one WMS layer on the globe
and btw this example doesnât work
the firebug wrote : TypeError: widget.centralBody.getImageryLayers is not a function
when I use your example : var layers = viewer.scene.imageryLayers;
firebug detected : TypeError: layers is undefined
Have a look at the Sandcastle demos, in particular âImagery Layersâ (http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Imagery%20Layers.html&label=Showcases) and âImagery Layer Manipulationâ. While this example uses a CesiumWidget, little changes when using the Viewer widget:
var viewer = new Cesium.Viewer(âcesiumContainerâ);
var layers = viewer.scene.imageryLayers;
Alex
I have several WMS layer in geoserver that I want to add them into cesium globe
but I want to add them on cesium viewer ( I have bingmaps key)
can anyone help me to solve this?
Thanks
Hi Nakula,
Does the Imagery Layers Sandcastle example work if you change the CesiumWidget to a Viewer widget? Note that if you only change the widget type and nothing else, youâll see an error reported while constructing the object as you cannot initialize the Viewer widget with an imagery layer without also disabling the baseLayerPicker:
var widget = new Cesium.Viewer('cesiumContainer', {
baseLayerPicker : false,
imageryProvider : new Cesium.ArcGisMapServerImageryProvider({
url : '//[server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer](http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer)'
})
});
Youâll see that in this sand castle example, it shows two imagery providers. Donât forget to also look at http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Imagery%20Layers%20Manipulation.html&label=Showcases that demonstrates how to layer multiple imagery layers.
Regarding the TypeError: widget.centralBody.getImageryLayers is not a function, weâve been making breaking changes recently in an effort to stablize the API for a 1.0. In that particular case, centralBody is not called globe and we no longer use setter/getter methods in favor of javascript properties.
Ah I see, the problem is on the baselayerpicker
Itâs working now
Thanks so much sirâŚ