|
7 | 7 | <meta charset="UTF-8" /> |
8 | 8 | <title data-i18n="resources.title_componentsDeckGL_React"></title> |
9 | 9 | <script type="text/javascript" include="react,jquery,papaparse,widgets" src="../js/include-web.js"></script> |
10 | | - <script include="deck,iclient-mapboxgl-react,mapbox-gl-enhance" src="../../dist/mapboxgl/include-mapboxgl.js"></script> |
| 10 | + <script |
| 11 | + include="deck,iclient-mapboxgl-react,mapbox-gl-enhance" |
| 12 | + src="../../dist/mapboxgl/include-mapboxgl.js" |
| 13 | + ></script> |
11 | 14 | <style> |
12 | 15 | html, |
13 | 16 | body { |
|
25 | 28 | <script type="text/babel"> |
26 | 29 | // import {SmDeckglLayer} from '@supermap/react-iclient' |
27 | 30 | var host = window.isLocal ? window.server : 'http://support.supermap.com.cn:8090'; |
28 | | - var attribution = |
29 | | - "<a href='https://www.mapbox.com/about/maps/' target='_blank'>© Mapbox </a>" + |
30 | | - " with <span>© <a href='http://iclient.supermap.io' target='_blank'>SuperMap iClient</a> | </span>" + |
31 | | - " Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> "; |
32 | 31 | var SmWebMap = window.SuperMap.Components.SmWebMap; |
33 | 32 | var SmDeckglLayer = window.SuperMap.Components.SmDeckglLayer; |
34 | 33 | var mapOptions = { |
|
37 | 36 | version: 8, |
38 | 37 | sources: { |
39 | 38 | 'raster-tiles': { |
40 | | - attribution: attribution, |
41 | 39 | type: 'raster', |
42 | 40 | tiles: [host + '/iserver/services/map-china400/rest/maps/ChinaDark/zxyTileImage.png?z={z}&x={x}&y={y}'], |
43 | 41 | tileSize: 256 |
|
61 | 59 |
|
62 | 60 | widgets.loader.showLoader('data loading...'); |
63 | 61 | var _this = this, |
64 | | - popup, map; |
| 62 | + popup, |
| 63 | + map; |
65 | 64 |
|
66 | 65 | function mapIsLoaded(e) { |
67 | | - map = e.map; |
68 | | - } |
| 66 | + map = e.map; |
| 67 | + } |
69 | 68 |
|
70 | 69 | $.get('../data/deck.gl/strees_data.csv', function(csvstr) { |
71 | 70 | widgets.loader.removeLoader(); |
|
131 | 130 | } |
132 | 131 | }; |
133 | 132 | ReactDOM.render( |
134 | | - <SmWebMap |
135 | | - mapOptions={mapOptions} |
136 | | - onLoad={mapIsLoaded} |
137 | | - > |
| 133 | + <SmWebMap mapOptions={mapOptions} onLoad={mapIsLoaded}> |
138 | 134 | <SmDeckglLayer layerType={'hexagon-layer'} options={deckglOptions} /> |
139 | 135 | </SmWebMap>, |
140 | 136 | document.getElementById('main') |
|
0 commit comments