Commit cc3eb40
77- " with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a> | </span>" +78- " Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> ";79- return {80- echartsOptions: echartsOptions,81- mapOptions: {82- container: 'map', // container id83- style: {84- version: 8,85- sources: {86- 'raster-tiles': {87- attribution: attribution,88- type: 'raster',89- tiles: [90- host +91- '/iserver/services/map-china400/rest/maps/ChinaDark/zxyTileImage.png?z={z}&x={x}&y={y}',92- ],93- tileSize: 256,94- },95- },96- layers: [97- {98- id: 'simple-tiles',99- type: 'raster',100- source: 'raster-tiles',101- minzoom: 0,102- maxzoom: 22,103- },104- ],105- },106- center: [125.35, 43.86],107- zoom: 10,108- },109- };110- },111- });112- });113- </script>114- </body>24+ <body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">25+ <div id="main">26+ <sm-web-map :map-options="mapOptions">27+ <sm-echarts-layer :options="echartsOptions"></sm-echarts-layer>28+ </sm-web-map>29+ </div>30+ <script>31+ $.get('../data/changchunBus.json', function(data) {32+ var echartsOptions = {33+ animation: false,34+ GLMap: {35+ roam: true36+ },37+ coordinateSystem: 'GLMap',38+ geo: {39+ map: 'GLMap'40+ },41+ series: [42+ {43+ type: 'lines',44+ polyline: true,45+ data: data,46+ silent: true,47+ lineStyle: {48+ normal: {49+ opacity: 0.2,50+ width: 151+ }52+ },53+ progressiveThreshold: 500,54+ progressive: 10055+ },56+ {57+ type: 'lines',58+ coordinateSystem: 'GLMap',59+ polyline: true,60+ data: data,61+ lineStyle: {62+ normal: {63+ width: 0.264+ }65+ },66+ effect: {67+ constantSpeed: 40,68+ show: true,69+ trailLength: 0.02,70+ symbolSize: 271+ }72+ }73+ ]74+ };75+ new Vue({76+ el: '#main',77+ data() {78+ var host = window.isLocal ? window.server : 'https://iserver.supermap.io';79+ var attribution =80+ "<a href='https://www.mapbox.com/about/maps/' target='_blank'>© Mapbox </a>" +81+ " with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a> | </span>" +82+ " Map Data <span>© <a href='http://support.supermap.com.cn/product/iServer.aspx' target='_blank'>SuperMap iServer</a></span> ";83+ return {84+ echartsOptions: echartsOptions,85+ mapOptions: {86+ container: 'map', // container id87+ style: {88+ version: 8,89+ sources: {90+ 'raster-tiles': {91+ attribution: attribution,92+ type: 'raster',93+ tiles: [94+ host +95+ '/iserver/services/map-china400/rest/maps/ChinaDark/zxyTileImage.png?z={z}&x={x}&y={y}'96+ ],97+ tileSize: 25698+ }99+ },100+ layers: [101+ {102+ id: 'simple-tiles',103+ type: 'raster',104+ source: 'raster-tiles',105+ minzoom: 0,106+ maxzoom: 22107+ }108+ ]109+ },110+ center: [125.35, 43.86],111+ zoom: 10112+ }113+ };114+ }115+ });116+ });117+ </script>118+ </body>115119</html>
0 commit comments