controler_attribution.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!--********************************************************************
  2. * Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  3. *********************************************************************-->
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <meta charset="UTF-8">
  8. <title data-i18n="resources.title_attribution"></title>
  9. <script type="text/javascript" src="../js/include-web.js"></script>
  10. <script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script>
  11. </head>
  12. <body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
  13. <div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
  14. <script type="text/javascript">
  15. var host = window.isLocal ? window.server : "https://iserver.supermap.io";
  16. var map,
  17. baseUrl = host + "/iserver/services/map-world/rest/maps/World",
  18. prefix = "<a href='https://leafletjs.com' title='A JS library for interactive maps'>Leaflet</a>",
  19. attribution = "Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>";
  20. map = L.map('map', {
  21. crs: L.CRS.EPSG4326,
  22. center: {lon: 0, lat: 0},
  23. maxZoom: 18,
  24. zoom: 2,
  25. zoomControl: false,
  26. logoControl: false,
  27. attributionControl: false,
  28. });
  29. L.control.attribution({
  30. position: 'bottomright',
  31. prefix: prefix
  32. }).addAttribution(attribution).addTo(map);
  33. L.supermap.tiledMapLayer(baseUrl,{attribution:false}).addTo(map);
  34. </script>
  35. </body>
  36. </html>