1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <!--********************************************************************
- * Copyright© 2000 - 2021 SuperMap Software Co.Ltd. All rights reserved.
- *********************************************************************-->
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title data-i18n="resources.title_dynamiclayers"></title>
- <script type="text/javascript" src="../js/include-web.js"></script>
- </head>
- <body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
- <div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
- <script type="text/javascript" src="../../dist/classic/include-classic.js"></script>
- <script type="text/javascript">
- var map, layer, host = window.isLocal ? window.server : "https://iserver.supermap.io";
- url = host + "/iserver/services/map-world/rest/maps/World";
- map = new SuperMap.Map("map", {
- controls: [
- new SuperMap.Control.Navigation(),
- new SuperMap.Control.Zoom()]
- });
- layer = new SuperMap.Layer.TiledDynamicRESTLayer("World", url, {
- transparent: true,
- cacheEnabled: true
- }, {
- dpi: 95.99999999999939,
- resolutions: [
- 0.34615384615384615, 0.17307692307692307,
- 0.08653846153846154, 0.04326923076923077,
- 0.021634615384615384, 0.010817307692307692,
- 0.005408653846153846, 0.002704326923076923,
- 0.0013521634615384615, 0.0006760817307692308,
- 0.0003380408653846154, 0.0001690204326923077,
- 0.00008451021634615384, 0.00004225510817307692,
- 0.00002112755408653846, 0.00001056377704326923
- ]
- });
- //监听图层信息加载完成事件
- layer.events.on({"layerInitialized": addLayer});
- function addLayer() {
- map.addLayer(layer);
- map.setCenter(new SuperMap.LonLat(0, 0), 1.5);
- }
- </script>
- </body>
- </html>
|