map2d_test.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <html>
  2. <head>
  3. <meta charset="utf-8" />
  4. <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
  5. <title></title>
  6. <style>
  7. html,
  8. body,
  9. .map {
  10. padding: 0;
  11. margin: 0;
  12. height: 100%;
  13. width: 100%;
  14. }
  15. </style>
  16. <script src="https://10.101.35.50/arcgis_js_api/library/4.19.1/init.js"></script>
  17. <script>
  18. require(["esri/Map", "esri/views/MapView", "esri/layers/MapImageLayer", "esri/layers/TileLayer", "esri/geometry/Geometry", "esri/geometry/Extent",
  19. "esri/tasks/GeometryService", "esri/layers/GraphicsLayer", "esri/layers/FeatureLayer", "esri/widgets/ScaleBar",
  20. "esri/WebMap", "esri/geometry/SpatialReference", "esri/Graphic", "esri/views/2d/draw/Draw",
  21. "esri/geometry/Polygon", "esri/widgets/Zoom", "esri/widgets/Compass", "esri/widgets/LayerList",
  22. "esri/geometry/geometryEngine", "esri/tasks/QueryTask", "esri/tasks/support/Query",
  23. "esri/geometry/Point", "esri/core/watchUtils", "esri/config", "dojo/on"],
  24. function (Map, MapView, MapImageLayer, TileLayer, Geometry, Extent, GeometryService,
  25. GraphicsLayer, FeatureLayer, ScaleBar, WebMap, SpatialReference, Graphic, Draw, Polygon,
  26. Zoom, Compass, LayerList, geometryEngine, QueryTask, Query, Point, watchUtils, esriConfig, on) {
  27. var m_map = new Map({
  28. logo: false,
  29. slider: false
  30. });
  31. var layer = new TileLayer({
  32. url: "https://10.101.35.50/arcgis/rest/services/zhwjlm4/MapServer",
  33. id: "1"
  34. });
  35. layer.visible = true;
  36. m_map.add(layer);
  37. var dyLayer = new MapImageLayer({
  38. url: "https://10.101.35.50/arcgis/rest/services/JGDX1/MapServer",
  39. id: "heatLayer",
  40. sublayers:[{
  41. id:0
  42. }]
  43. });
  44. dyLayer.visible = true;
  45. m_map.add(dyLayer);
  46. var m_view = new MapView({
  47. container: "mapDiv",
  48. map: m_map,
  49. popup: {
  50. dockEnabled: false,
  51. dockOptions: {
  52. position: "top-right",
  53. breakpoint: false
  54. }
  55. }
  56. });
  57. });
  58. </script>
  59. </head>
  60. <body>
  61. <div id="mapDiv" class="map"></div>
  62. <img src="https://10.101.35.50/zhwj/assets/image/title1.png"></img>
  63. </body>
  64. </html>