map_changchunMap.html 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. <!--********************************************************************
  2. * Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  3. *********************************************************************-->
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  8. <title data-i18n="resources.title_changchunMap"></title>
  9. <script type="text/javascript" src="../js/include-web.js"></script>
  10. </head>
  11. <body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
  12. <div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
  13. <script type="text/javascript" exclude="iclient-classic" src="../../dist/classic/include-classic.js"></script>
  14. <script type="text/javascript">
  15. var map, layer, host = window.isLocal ? window.server : "https://iserver.supermap.io";
  16. url = host + "/iserver/services/map-changchun/rest/maps/长春市区图";
  17. map = new SuperMap.Map("map", {
  18. controls: [
  19. new SuperMap.Control.Navigation(),
  20. new SuperMap.Control.Zoom()]
  21. });
  22. map.addControl(new SuperMap.Control.MousePosition());
  23. layer = new SuperMap.Layer.TiledDynamicRESTLayer("China", url, null, {maxResolution: "auto"});
  24. layer.events.on({"layerInitialized": addLayer});
  25. function addLayer() {
  26. map.addLayer(layer);
  27. map.setCenter(new SuperMap.LonLat(5105, -3375), 0);
  28. }
  29. </script>
  30. </body>
  31. </html>