相关示例
- 添加自定义baselayer
var providerViewModels = [];let gaodev = new Cesium.UrlTemplateImageryProvider({
url:"http://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",subdomains: ["1", "2", "3", "4"]});var gaodeMapModel = new Cesium.ProviderViewModel({
name: "高德矢量",iconUrl: Cesium.buildModuleUrl("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip: "高德矢量 地图服务",creationFunction: function() {
return gaodev;//可以返回数据组}});providerViewModels.push(gaodeMapModel);
this.viewer.baseLayerPicker.viewModel.imageryProviderViewModels = providerViewModels;
参考资料
[1]http://blog.sina.com.cn/s/blog_15e866bbe0102xnml.html
更多内容,欢迎关注公众号