我在尝试添加动态图层时在控制台中出现此错误
**p: Geometry (wkid: 102723) cannot be converted to spatial reference of the map (wkid: 102100)**
function mapDirective($rootScope,MapService) {
function addLayers(map){
var layer = new ArcGISDynamicMapServiceLayer(config.gisServer, {});
map.addLayer(layer);
MapService.setData('layer',layer);
}
return {
template: require('./mapDirective.html'),
restrict: 'E',
transclude: true,
scope: {
onmapready: '&'
},
link: function(scope, element, attrs) {
var map = new Map("mapDiv", {
zoom: 5,
basemap: "topo",
sliderPosition: "bottom-left",
extent: new Extent({
xmin:1381092.7817073173,
ymin:-428571.11493902426,
xmax:1406749.947560976,ymax:443420.3850609755,
spatialReference:{wkid:102723}})
});
map.on("load",function(){
MapService.setData('map',map);
$rootScope.$broadcast('map-ready',map);
});
addLayers(map);
}
};
}
我在创建底图时尝试使用动态图层的相同范围和空间参考,而我的动态图层未在地图中添加