<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SuperMap iClient for JavaScript:TiledDynamicRESTLayer</title>
<script src="libs/SuperMap.Include.js"></script>
<script type="text/javascript">
var map, layer;
var url = "http://localhost:8090/iserver/services/map-jingjin/rest/maps/京津地区土地利用现状图";
function onPageLond() {
map = new SuperMap.Map('map',{controls:[
new SuperMap.Control.PanZoomBar(),//平移和缩放按钮
new SuperMap.Control.ScaleLine(),//显示比例尺
new SuperMap.Control.Navigation({dragPanOptions:{enableKinetic:true}}),//导航,鼠标可在窗口拖拽地图
]}
);
layer = new SuperMap.Layer.TiledDynamicRESTLayer(
"京津地区土地利用现状图",
url,
{transparent:true, cacheEnabled:true},
{maxResolution:"auto"}
);
layer.events.on({"layerInitialized": addLayer});
}
function addLayer() {
var objs = [layer];
map.addLayers(objs);
map.setCenter(new SuperMap.LonLat(0, 0), 0);
}
</script>
</head>
<body onload="onPageLond()">
<div id="map" style="position:relative; left:0px; right:0px; width:1000px;height:500px;" >
</div>
<form id="f1">
<input id="t1" type="button" value="确定" />
</form>
</body>
</html>