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)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
AiPPT
2024-09-19 广告
2024-09-19 广告
随着AI技术的飞速发展,如今市面上涌现了许多实用易操作的AI生成工具1、简介:AiPPT: 这款AI工具智能理解用户输入的主题,提供“AI智能生成”和“导入本地大纲”的选项,生成的PPT内容丰富多样,可自由编辑和添加元素,图表类型包括柱状图...
点击进入详情页
本回答由AiPPT提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询