mvtVectorTile_precache.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <!--********************************************************************
  2. * Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
  3. *********************************************************************-->
  4. <html>
  5. <head>
  6. <meta charset='utf-8'/>
  7. <title>UGCV5(MVT)</title>
  8. <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no'/>
  9. <script type="text/javascript" exclude='iclient-mapboxgl' src="../../dist/mapboxgl/include-mapboxgl.js"></script>
  10. <style>
  11. body {
  12. margin: 0;
  13. padding: 0;
  14. }
  15. #map {
  16. position: absolute;
  17. top: 0;
  18. bottom: 0;
  19. width: 100%;
  20. }
  21. </style>
  22. </head>
  23. <body>
  24. <div id='map'></div>
  25. <script type="text/javascript">
  26. var host = window.isLocal ? window.server : "https://iserver.supermap.io";
  27. var map = new mapboxgl.Map({
  28. container: 'map', // container id
  29. style: host + '/iserver/services/map-mvt-China/rest/maps/China/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true',
  30. center: [120.143, 30.236], // starting position
  31. zoom: 0,
  32. attributionControl: false
  33. });
  34. map.addControl(new mapboxgl.NavigationControl(), 'top-left');
  35. </script>
  36. </body>
  37. </html>