mapEsri.html 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org" lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title>首页</title>
  6. <script type="text/javascript" src="http://172.20.98.215:8080/arcgis_js_api/library/3.22/rgis/Rinit.js"></script>
  7. <style>
  8. html,
  9. body {
  10. height: 100%;
  11. width: 100%;
  12. margin: 0;
  13. padding: 0;
  14. }
  15. .webMap {
  16. height: 100%;
  17. width: 100%;
  18. }
  19. </style>
  20. </head>
  21. <body>
  22. <div class="webMap" id="map111"></div>
  23. <script>
  24. var map;
  25. require([
  26. "esri/map",
  27. "rgis/tools/TokenUtil",
  28. "rgis/tools/RFindUtil",
  29. "rgis/tools/RMeasure",
  30. "rgis/layers/TianDiTuLayer",
  31. "esri/geometry/Extent",
  32. "esri/geometry/Point",
  33. "esri/geometry/Polyline",
  34. "esri/layers/ArcGISDynamicMapServiceLayer",
  35. "esri/layers/ArcGISTiledMapServiceLayer",
  36. "esri/layers/GraphicsLayer",
  37. "esri/symbols/SimpleLineSymbol",
  38. "esri/symbols/SimpleMarkerSymbol",
  39. "esri/symbols/TextSymbol",
  40. "esri/symbols/Font",
  41. "esri/Color",
  42. "esri/graphic",
  43. "esri/geometry/webMercatorUtils",
  44. "esri/SpatialReference",
  45. "esri/geometry/Circle",
  46. "esri/symbols/SimpleFillSymbol",
  47. "esri/symbols/PictureMarkerSymbol",
  48. "rgis/layers/echarts.min",
  49. "dojo/domReady!"
  50. ], function (Map, TokenUtil, RFindUtil, RMeasure, TianDiTuLayer, Extent, Point, Polyline, ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, GraphicsLayer, SimpleLineSymbol,
  51. SimpleMarkerSymbol, TextSymbol, Font, Color, Graphic, webMercatorUtils, SpatialReference, Circle, SimpleFillSymbol, PictureMarkerSymbol, echarts, SwipeTool) {
  52. map = new Map("map111", {
  53. logo: false,
  54. sliderPosition: "bottom-right",
  55. extent: new Extent({
  56. xmax: 120.179443359375,
  57. xmin: 109.632568359375,
  58. ymax: 41.0504150390625,
  59. ymin: 35.7275390625,
  60. spatialReference: { wkid: 4490 }
  61. })
  62. });
  63. var layer = new ArcGISDynamicMapServiceLayer("http://172.20.98.156:8080/OneMapServer/rest/services/BaseMap_white/MapServer")
  64. var xlLayer = new ArcGISDynamicMapServiceLayer("http://172.20.98.156:8080/OneMapServer/rest/services/SH_XL/MapServer")
  65. var czLayer = new ArcGISDynamicMapServiceLayer("http://172.20.98.156:8080/OneMapServer/rest/services/SH_CZXL_V2/MapServer")
  66. map.addLayer(layer);
  67. map.addLayer(xlLayer);
  68. map.addLayer(czLayer);
  69. })
  70. </script>
  71. </body>
  72. </html>