_down_initMap.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!DOCTYPE html>
  2. <html>
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
  7. <script type="text/javascript" src="http://172.20.98.215:8080/arcgis_js_api/library/3.22/rgis/Rinit.js"></script>
  8. <title></title>
  9. <style type="text/css">
  10. *{
  11. margin: 0;
  12. padding: 0;
  13. }
  14. html, body, #map{
  15. height: 100%;
  16. width: 100%;
  17. }
  18. </style>
  19. <script>
  20. var host="http://172.17.109.19:8080";
  21. var serverIP="http://172.17.109.19:8080";
  22. var itemName="/Portal";
  23. var map_wkid = "4490";
  24. window.urlPath = host;
  25. document.write("<script src='http://172.17.109.19:8080/Portal/arcgis2D.js'><\/script>");
  26. document.write('<script src="'+host+itemName+'/js/jquery/jquery-1.9.1.min.js"><\/script>');
  27. </script>
  28. </head>
  29. <body>
  30. <div id="map"></div>
  31. </body>
  32. <script type="text/javascript">
  33. var map;
  34. require([
  35. "esri/map",
  36. "rgis/tools/TokenUtil",
  37. "rgis/layers/TianDiTuLayer",
  38. "esri/layers/ArcGISDynamicMapServiceLayer",
  39. "esri/geometry/Extent",
  40. "dojo/domReady!"
  41. ], function (Map,TokenUtil, TianDiTuLayer,ArcGISDynamicMapServiceLayer, Extent) {
  42. map = new Map("map", {
  43. logo: false,
  44. sliderPosition: "bottom-right",
  45. sliderStyle: "small"
  46. });
  47. var layer = new ArcGISDynamicMapServiceLayer("http://172.20.98.156:8080/OneMapServer/rest/services/BaseMap_white/MapServer")
  48. var xlLayer = new ArcGISDynamicMapServiceLayer("http://172.20.98.156:8080/OneMapServer/rest/services/SH_XL/MapServer")
  49. var czLayer = new ArcGISDynamicMapServiceLayer("http://172.20.98.156:8080/OneMapServer/rest/services/SH_CZXL_V2/MapServer")
  50. map.addLayer(layer)
  51. map.addLayer(xlLayer)
  52. map.addLayer(czLayer)
  53. });
  54. </script>
  55. </html>