Cesium基础图层自定义

			//定义ImageryProvider:
			var esriMap = new Cesium.ArcGisMapServerImageryProvider({
				url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer',
				enablePickFeatures: false
			});
			//设置ProviderViewModel:
			var esriMapModel = new Cesium.ProviderViewModel({
				name: 'ESRI影像图',
				iconUrl: Cesium.buildModuleUrl('./Widgets/Images/ImageryProviders/esriWorldImagery.png'),
				tooltip: 'ArcGIS 地图服务',
				creationFunction: function() {
					return esriMap;
				}
			});
			//只有一个
			viewer.baseLayerPicker.viewModel.imageryProviderViewModels.removeAll();
			var providerViewModels = [];
			providerViewModels.push(esriMapModel);
			viewer.baseLayerPicker.viewModel.imageryProviderViewModels = providerViewModels;

你可能感兴趣的:(Cesium,Cesium基础图层自定义)