arcgis javascript api 加载天地图

  • Z2_655925
    了解作者
  • 8.6KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-22 05:11
    上传日期
arcgis js api加载天地图矢量图、注记图、影像图例子,解压打开网页,就有效果,代码都在页面中,简单易读,希望帮助到你,给个好评
tianditu.rar
  • tianditu
  • img
  • blur.png
    2.9KB
  • facus.png
    2.8KB
  • GISImgMap.html
    4KB
  • tiandituImgLayer.js
    8.7KB
内容介绍
<!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" href="https://js.arcgis.com/3.17/esri/css/esri.css"> <style type="text/css"> html,body,#mapDIV{ height:100%; width:100%; margin:0px; padding:0px; } </style> <script src="https://js.arcgis.com/3.17/"></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>
评论
    相关推荐