使用产品:iserver 11i 操作系统:win10
用示例的代码调用不了UGCV5的wms
示例代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title data-i18n="resources.title_wms"></title>
<script type="text/javascript" src="../js/include-web.js"></script>
</head>
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
<script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script>
<script type="text/javascript">
var host = window.isLocal ? window.server : "
https://iserver.supermap.io";
var map = L.map('map', {
center: [0, 0],
maxZoom: 18,
zoom: 1
});
new L.TileLayer.WMS(host + "/iserver/services/map-china400/wms111/China", {
layers: 'China',
format: 'image/png',
transparent: true,
noWrap: true,
attribution: "Map Data <span>© <a href='
http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span>"
}).addTo(map);
</script>
</body>
</html>