ArcGIS API for JavaScript。使用WMS地图服务,放大缩小地图会偏移。请高手请教 20
map=newesri.Map(obj,{logo:false,nav:false});//service=WMS&request=GetCapabilitiesvarr...
map = new esri.Map(obj, {
logo: false,
nav: false
});
//service=WMS&request=GetCapabilities
var resourceInfo = {
extent: new esri.geometry.Extent(480000, 3486821, 535900, 3524616, { wkid: 0 }),
layerInfos: [new esri.layers.WMSLayerInfo({ name: "baseLyr", title: "csvector" })]
};
//minx miny maxx maxy
var wmsLayer = new esri.layers.WMSLayer("http://192.168.4.20/WMS/ArcGIS/csvector.gis",
{ resourceInfo: resourceInfo,
visibleLayers: ["baseLyr"], id:"wmsl"
}
);
var yxtLayer = new esri.layers.WMSLayer("http://192.168.4.20/WMS/ArcGIS/cs2013dom.gis",
{ resourceInfo: resourceInfo,
visibleLayers: ["baseLyr"], id:"yxtl"
}
);
map.addLayer(wmsLayer);
map.addLayer(yxtLayer);
yxtLayer.hide(); 展开
logo: false,
nav: false
});
//service=WMS&request=GetCapabilities
var resourceInfo = {
extent: new esri.geometry.Extent(480000, 3486821, 535900, 3524616, { wkid: 0 }),
layerInfos: [new esri.layers.WMSLayerInfo({ name: "baseLyr", title: "csvector" })]
};
//minx miny maxx maxy
var wmsLayer = new esri.layers.WMSLayer("http://192.168.4.20/WMS/ArcGIS/csvector.gis",
{ resourceInfo: resourceInfo,
visibleLayers: ["baseLyr"], id:"wmsl"
}
);
var yxtLayer = new esri.layers.WMSLayer("http://192.168.4.20/WMS/ArcGIS/cs2013dom.gis",
{ resourceInfo: resourceInfo,
visibleLayers: ["baseLyr"], id:"yxtl"
}
);
map.addLayer(wmsLayer);
map.addLayer(yxtLayer);
yxtLayer.hide(); 展开
1个回答
展开全部
两个图层的投影是否一样呢
追问
图层的投影?不懂 如何查看两个图层的投影?望告知 非常感谢
追答
alert(wmsLayer.extent.spatialReference.wkid)
alert(yxtLayer.extent.spatialReference.wkid)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
光点科技
2023-08-15 广告
2023-08-15 广告
通常情况下,我们会按照结构模型把系统产生的数据分为三种类型:结构化数据、半结构化数据和非结构化数据。结构化数据,即行数据,是存储在数据库里,可以用二维表结构来逻辑表达实现的数据。最常见的就是数字数据和文本数据,它们可以某种标准格式存在于文件...
点击进入详情页
本回答由光点科技提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询