<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>天地图影像图</title>
<link rel="stylesheet" type="text/css" href="http://192.168.1.47/arcgis_js_api/library/3.19/3.19/dijit/themes/tundra/tundra.css"/>
<link rel="stylesheet" type="text/css" href="http://192.168.1.47/arcgis_js_api/library/3.19/3.19/esri/css/esri.css" />
<style type="text/css">
html,body,#mapDIV{
height:100%;
width:100%;
margin:0px;
padding:0px;
}
</style>
<script type="text/javascript" src="http://192.168.1.47/arcgis_js_api/library/3.19/3.19/init.js"></script>
<script src="tiandituImgLayer.js"></script>
<script type="text/javascript">
dojo.require("esri.map");
function init(){
var fullExtent=new esri.geometry.Extent({
"xmin":114.7236044185,
"ymin":34.3438438167,
"xmax":122.7436239498,
"ymax":38.3373740902,
"spatialReference":{"wkid":4326}
});
var map=new esri.Map("mapDIV",{
logo:false,
autoResize:true,
slider:true,
extent:fullExtent,
zoom:8
});
var veclayer = new TDTLayer();
map.addLayer(veclayer);//天地图地图
var imagerymap = new TDTImageryLayer();
//map.addLayer(imagerymap);//天地图影像图
var annolayer= new TDTAnnoLayer();
map.addLayer(annolayer);//天地图注记图
dojo.connect(dojo.byId('vec'), 'onclick', function (evt) {
dojo.style(dojo.byId("vec"), { "background": "url(img/facus.png)", "color": " #ffffff", "font-weight": "bold" });
dojo.style(dojo.byId("img"), { "background": "url(img/blur.png)", "color": " #000000", "font-weight": "normal" });
dojo.style(dojo.byId("vecimg"), { "background": "url(img/blur.png)", "color": " #000000", "font-weight": "normal" });
map.removeAllLayers();
map.addLayer(veclayer);
map.addLayer(annolayer);
});
dojo.connect(dojo.byId('img'), 'onclick', function (evt) {
dojo.style(dojo.byId("img"), { "background": "url(img/facus.png)", "color": " #ffffff", "font-weight": "bold" });
dojo.style(dojo.byId("vec"), { "background": "url(img/blur.png)", "color": " #000000", "font-weight": "normal" });
dojo.style(dojo.byId("vecimg"), { "background": "url(img/blur.png)", "color": " #000000", "font-weight": "normal" });
map.removeAllLayers();
map.addLayer(imagerymap);
});
dojo.connect(dojo.byId('vecimg'), 'onclick', function (evt) {
dojo.style(dojo.byId("vecimg"), { "background": "url(img/facus.png)", "color": " #ffffff", "font-weight": "bold" });
dojo.style(dojo.byId("img"), { "background": "url(img/blur.png)", "color": " #000000", "font-weight": "normal" });
dojo.style(dojo.byId("vec"), { "background": "url(img/blur.png)", "color": " #000000", "font-weight": "normal" });
map.removeAllLayers();
map.addLayer(imagerymap);
map.addLayer(annolayer);
});
}
dojo.ready(init);
</script>
</head>
<body class="claro">
<div style="right: 80px; top: 20px; right: 11px; position: absolute; z-index: 1100;">
<div id="vec" style=" text-align: center; line-height: 24px; width: 70px; background: url(img/facus.png); float: left; height: 24px;
color: #ffffff; font-size: 12px; cursor: pointer; font-weight: bold" >地图</div>
<div id="img" style="text-align: center; line-height: 24px; width: 70px; background: url(img/blur.png); float: left; height: 24px;
color:#000000; font-size: 12px; cursor: pointer; font-weight: normal" >影像</div>
<div id="vecimg" style="text-align: center; line-height: 24px; width: 70px; background: url(img/blur.png); float: left; height: 24px;
color: #000000; font-size: 12px; cursor: pointer; font-weight: normal" >影像叠加</div>
</div>
<div id="mapDIV">
</div>
</body>
</html>