码迷,mamicode.com
首页 > 其他好文 > 详细

skyline加载arcgis发布的wms服务

时间:2019-12-17 10:24:21      阅读:85      评论:0      收藏:0      [点我收藏+]

标签:layer   server   kylin   str   version   services   func   版权   width   

function AddWMSLayer(LayerName) {
var _WMSUrl =“http://10.0.4.141:6080/arcgis/services/poss1/MapServer/WmsServer”;
var layerGroup = sg.ProjectTree.FindItem(“Layers”);
if (layerGroup == “”){
layerGroup = sg.ProjectTree.CreateGroup(“Layers”, “”);
}

if (LayerName != null && LayerName != "") {
var itemidlayer = sg.ProjectTree.FindItem("Layers\\" + LayerName);
if (itemidlayer != ""){
sg.ProjectTree.DeleteItem(itemidlayer);
}

var wmsStr =
"[INFO]\n" +
"Meters=1.2m\n" +
"MPP=0.000027578125" + "\n"
+"Url=" + _WMSUrl + "?request=GetMap&Version=1.3.0&service=WMS&crs=CRS:84&bbox=113.54910763279433,24.5858358542103,113.57569495732433,24.628050567114293&height=256&width=256&layers=0&styles=&format=image/png\n"
+ "xul=113.54910763279433" + "\n" +
"ylr=24.5858358542103" + "\n" +
"xlr=113.57569495732433" + "\n" +
"yul=24.628050567114293" + "\n";
var imagelayer = sg.Creator.CreateImageryLayer("wms",113.54910763279433, 24.5858358542103,113.57569495732433,24.628050567114293, "<EXT><ExtInfo><![CDATA[" + wmsStr + "]]></ExtInfo><ExtType>wms</ExtType></EXT>", "gisplg.rct", layerGroup, LayerName);
imagelayer.CoordinateSystem = sg.Terrain.CoordinateSystem;
}

}

修改一下

————————————————
版权声明:本文为CSDN博主「li_ming_yue」的原创文章,遵循CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/li_ming_yue/article/details/88990584

skyline加载arcgis发布的wms服务

标签:layer   server   kylin   str   version   services   func   版权   width   

原文地址:https://www.cnblogs.com/li-mingyue/p/skyline_js.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!