├── .browserslistrc
├── .gitignore
├── README.md
├── babel.config.js
├── dist
├── css
│ ├── app.85efa0d5.css
│ ├── chunk-vendors.02d743b0.css
│ ├── flow~geotiff~leafletEcharts~points.a5f0d01f.css
│ └── points.3d02ecf1.css
├── favicon.ico
├── index.html
├── js
│ ├── app.be980611.js
│ ├── app.be980611.js.map
│ ├── chunk-vendors.76327266.js
│ ├── chunk-vendors.76327266.js.map
│ ├── flow.9f83f499.js
│ ├── flow.9f83f499.js.map
│ ├── flow~geotiff~leafletEcharts~points.cb32dc6f.js
│ ├── flow~geotiff~leafletEcharts~points.cb32dc6f.js.map
│ ├── geotiff.7d3050c9.js
│ ├── geotiff.7d3050c9.js.map
│ ├── geotiff~leafletEcharts.aa46c8f5.js
│ ├── geotiff~leafletEcharts.aa46c8f5.js.map
│ ├── leafletEcharts.1d4d598f.js
│ ├── leafletEcharts.1d4d598f.js.map
│ ├── points.ff29ca1c.js
│ └── points.ff29ca1c.js.map
├── wrfout-warp.tif
└── wrfout.tif
├── package-lock.json
├── package.json
├── postcss.config.js
├── public
├── favicon.ico
├── index.html
├── wrfout-warp.tif
└── wrfout.tif
├── src
├── App.vue
├── assets
│ ├── css
│ │ ├── main.less
│ │ └── reset.less
│ ├── js
│ │ ├── flow.js
│ │ ├── points.js
│ │ ├── staticWind.js
│ │ ├── stations.js
│ │ └── wind.js
│ └── logo.png
├── components
│ ├── ButtonGroup.vue
│ ├── Description.vue
│ ├── FlowLayer.vue
│ ├── LinesLayer.vue
│ ├── MarkerClusterLayer.vue
│ ├── NavList.vue
│ ├── ScatterLayer.vue
│ ├── StaticFlowLayer.vue
│ ├── TiffToCanvasLayer.vue
│ ├── TiffToGeojsonLayer.vue
│ ├── TiffToGridLayer.vue
│ ├── TiffToImageLayer.vue
│ └── WindyLayer.vue
├── main.js
├── plugins
│ ├── func.wind.js
│ ├── georaster-layer-for-leaflet-interpotations.js
│ ├── leaflet-echarts.js
│ ├── leaflet-velocity.js
│ ├── leaflet.canvasLayer.js
│ └── ocean.weather.wind.js
├── router.js
└── views
│ ├── EchartsMapLayer.vue
│ ├── FlowMapLayer.vue
│ ├── PointsMapLayer.vue
│ └── TiffMapLayer.vue
└── vue.config.js
/.browserslistrc:
--------------------------------------------------------------------------------
1 | > 1%
2 | last 2 versions
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 |
4 | # local env files
5 | .env.local
6 | .env.*.local
7 |
8 | # Log files
9 | npm-debug.log*
10 | yarn-debug.log*
11 | yarn-error.log*
12 |
13 | # Editor directories and files
14 | .idea
15 | .vscode
16 | *.suo
17 | *.ntvs*
18 | *.njsproj
19 | *.sln
20 | *.sw?
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # leaflet-learn
2 |
3 | ## Example
4 | [demo](https://zjfcool.github.io/leaflet-learn/dist/)
5 |
6 | ## Project setup
7 | ```
8 | npm install
9 | ```
10 |
11 | ### Compiles and hot-reloads for development
12 | ```
13 | npm run serve
14 | ```
15 |
16 | ### Compiles and minifies for production
17 | ```
18 | npm run build
19 | ```
20 |
21 | ### geotiff文件在leaflet中的几种渲染方式
22 |
23 | 1. 怎样解析一个geotiff文件
24 |
25 |
26 | 解析geotiff文件我们需要用到开源的库[geotiff](https://github.com/geotiffjs/geotiff.js),具体用法如下
27 |
28 | ```javscript
29 |
30 | import * as GeoTIFF from 'geotiff'
31 |
32 | const tiff= await GeoTIFF.fromArrayBuffer(buffer);
33 | let image = await tiff.getImage();
34 | this.tiffWidth = image.getWidth();
35 | this.tiffHeight = image.getHeight();
36 | let rasters = await image.readRasters();
37 | let tiepoint = image.getTiePoints()[0];
38 | let pixelScale = image.getFileDirectory().ModelPixelScale;
39 |
40 | this.geoTransform = [
41 | tiepoint.x,
42 | pixelScale[0],
43 | 0,
44 | tiepoint.y,
45 | 0,
46 | -1 * pixelScale[1]
47 | ];
48 |
49 |
50 | this.tempData = new Array(this.tiffHeight);
51 | for (let j = 0; j < this.tiffHeight; j++) {
52 | this.tempData[j] = new Array(this.tiffWidth);
53 | for (let i = 0; i < this.tiffWidth; i++) {
54 | this.tempData[j][i] = rasters[0][i + j * this.tiffWidth];
55 | }
56 | }
57 |
58 | ```
59 |
60 | 2. 将解析完的tiff文件转为等值面 [示例代码](https://github.com/zjfcool/leaflet-learn/blob/master/src/components/TiffToGeojsonLayer.vue)
61 | ```
62 |
63 | import {isobands} from "raster-marching-squares";
64 |
65 | const intervalsSpd = [-1,0,1,2,3,4,5];
66 | this.geojson_data = isobands(
67 | this.tempData,
68 | this.geoTransform,
69 | intervalsSpd
70 | );
71 |
72 | import 'leaflet.vectorgrid'
73 |
74 | this.layer = L.vectorGrid.slicer(this.geojson_data,{
75 | rendererFactory: L.canvas.tile,
76 | interactive: true,
77 | vectorTileLayerStyles:{
78 | sliced:this.geojsonStyle
79 | },
80 | }).addTo(this.map);
81 |
82 | ```
83 |
84 | 3. 将tiff文件转化为图片渲染到地图中 [示例代码](https://github.com/zjfcool/leaflet-learn/blob/master/src/components/TiffToImageLayer.vue)
85 |
86 | ```
87 |
88 |
89 | const bounds = image.getBoundingBox();
90 | const canvas = document.createElement("canvas");
91 | const rightBottomPixel = this.map.latLngToContainerPoint([bounds[1],bounds[2]])
92 | const leftTopPixel = this.map.latLngToContainerPoint([bounds[3],bounds[0]]);
93 | const tileWidth = rightBottomPixel.x - leftTopPixel.x,
94 | tileHeight = rightBottomPixel.y - leftTopPixel.y;
95 | canvas.width = tileWidth;
96 | canvas.height = tileHeight;
97 | const context = canvas.getContext("2d");
98 | const id = context.createImageData(tileWidth, tileHeight);
99 | const canvasData = id.data;
100 | let scale = chroma
101 | .scale(this.colors)
102 | .domain(this.ranges);
103 | for (let y = 0; y < tileHeight; y++) {
104 | for (let x = 0; x < tileWidth; x++) {
105 | const latlng = this.map.layerPointToLatLng([leftTopPixel.x+x,leftTopPixel.y+y])
106 | const px = ( latlng.lng - geoTransform[0])/geoTransform[1]
107 | const py = ( latlng.lat - geoTransform[3])/geoTransform[5]
108 | if(Math.floor(px) >= 0 && Math.floor(py) >= 0){
109 | // console.log(Math.floor(px),Math.floor(py))
110 | let rgba = scale(tempData[Math.floor(py)][Math.floor(px)]).rgba();
111 | if(tempData[Math.floor(py)][Math.floor(px)] == this.noDataValue) rgba=[0,0,0,0];
112 | const index = (y * tileWidth + x) * 4;
113 | canvasData[index + 0] = rgba[0];
114 | canvasData[index + 1] = rgba[1];
115 | canvasData[index + 2] = rgba[2];
116 | canvasData[index + 3] = rgba[3] * 255;
117 | }
118 |
119 | }
120 | }
121 |
122 | L.imageOverlay(
123 | canvas.toDataURL(),
124 | [[bounds[1], bounds[0]], [bounds[3], bounds[2]]],
125 | {
126 | opacity: 0.3
127 | }
128 | ).addTo(this.map);
129 |
130 |
131 | ```
132 |
133 | ### leaflet与echarts结合
134 |
135 | 1. 风场[示例代码](https://github.com/zjfcool/leaflet-learn/blob/master/src/components/WindyLayer.vue)
136 | 2. 散点[示例代码](https://github.com/zjfcool/leaflet-learn/blob/master/src/components/ScatterLayer.vue)
137 |
138 | ### 风场
139 |
140 | 1. 动态风场,使用插件[leaflet-velocity](https://github.com/zjfcool/leaflet-learn/blob/master/src/plugins/leaflet-velocity.js),[示例代码](https://github.com/zjfcool/leaflet-learn/blob/master/src/components/FlowLayer.vue)
141 |
142 | 2. 静态风场[示例代码](https://github.com/zjfcool/leaflet-learn/blob/master/src/components/StaticFlowLayer.vue)
143 |
144 | ### 散点聚合
145 |
146 | 1. 聚合插件[leaflet.markercluster](https://github.com/Leaflet/Leaflet.markercluster),[示例代码](https://github.com/zjfcool/leaflet-learn/blob/master/src/components/MarkerClusterLayer.vue)
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/app'
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/dist/css/app.85efa0d5.css:
--------------------------------------------------------------------------------
1 | .nav-list[data-v-14f9e054]{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:9999}.nav-list li+li[data-v-14f9e054]{border-bottom:1px solid hsla(0,0%,100%,.2)}.nav-list li[data-v-14f9e054]{padding:12px 4px;font-size:14px;color:#fff;background-color:#058eed}.nav-list li.router-link-active[data-v-14f9e054]{background-color:#0a6db1}.nav-list li[data-v-14f9e054]:hover{cursor:pointer;background-color:#0a6db1}#app{height:100%}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body,html{width:100%;height:100%;overflow:hidden}
--------------------------------------------------------------------------------
/dist/css/chunk-vendors.02d743b0.css:
--------------------------------------------------------------------------------
1 | .leaflet-image-layer,.leaflet-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane,.leaflet-pane>canvas,.leaflet-pane>svg,.leaflet-tile,.leaflet-tile-container,.leaflet-zoom-box{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-overlay-pane svg,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer{max-width:none!important;max-height:none!important}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51,181,229,.4)}.leaflet-tile{-webkit-filter:inherit;filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-bottom,.leaflet-top{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-tile{will-change:opacity}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;transform-origin:0 0}.leaflet-zoom-anim .leaflet-zoom-animated{will-change:transform;-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1),-webkit-transform .25s cubic-bezier(0,0,.25,1)}.leaflet-pan-anim .leaflet-tile,.leaflet-zoom-anim .leaflet-tile{-webkit-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-control,.leaflet-popup-pane{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:grabbing}.leaflet-image-layer,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-image-layer.leaflet-interactive,.leaflet-marker-icon.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline:0}.leaflet-container a{color:#0078a8}.leaflet-container a.leaflet-active{outline:2px solid orange}.leaflet-zoom-box{border:2px dotted #38f;background:hsla(0,0%,100%,.5)}.leaflet-container{font:12px/1.5 Helvetica Neue,Arial,Helvetica,sans-serif}.leaflet-bar{-webkit-box-shadow:0 1px 5px rgba(0,0,0,.65);box-shadow:0 1px 5px rgba(0,0,0,.65);border-radius:4px}.leaflet-bar a,.leaflet-bar a:hover{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:#000}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:700 18px Lucida Console,Monaco,monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{-webkit-box-shadow:0 1px 5px rgba(0,0,0,.4);box-shadow:0 1px 5px rgba(0,0,0,.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers-expanded .leaflet-control-layers-toggle,.leaflet-control-layers .leaflet-control-layers-list{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fff;background:hsla(0,0%,100%,.7);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover{text-decoration:underline}.leaflet-container .leaflet-control-attribution,.leaflet-container .leaflet-control-scale{font-size:11px}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;font-size:11px;white-space:nowrap;overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;background:#fff;background:hsla(0,0%,100%,.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers{-webkit-box-shadow:none;box-shadow:none}.leaflet-touch .leaflet-bar,.leaflet-touch .leaflet-control-layers{border:2px solid rgba(0,0,0,.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 19px;line-height:1.4}.leaflet-popup-content p{margin:18px 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:#fff;color:#333;-webkit-box-shadow:0 3px 14px rgba(0,0,0,.4);box-shadow:0 3px 14px rgba(0,0,0,.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;padding:4px 4px 0 0;border:none;text-align:center;width:18px;height:14px;font:16px/14px Tahoma,Verdana,sans-serif;color:#c3c3c3;text-decoration:none;font-weight:700;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover{color:#999}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678,M12=0.70710678,M21=-0.70710678,M22=0.70710678)}.leaflet-oldie .leaflet-popup-tip-container{margin-top:-1px}.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-box-shadow:0 1px 3px rgba(0,0,0,.4);box-shadow:0 1px 3px rgba(0,0,0,.4)}.leaflet-tooltip.leaflet-clickable{cursor:pointer;pointer-events:auto}.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before,.leaflet-tooltip-top:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}
--------------------------------------------------------------------------------
/dist/css/flow~geotiff~leafletEcharts~points.a5f0d01f.css:
--------------------------------------------------------------------------------
1 | .btn-group[data-v-13036f20]{position:absolute;top:0;left:0;width:100%;z-index:9999;text-align:center}.btn-group li[data-v-13036f20]{display:inline-block;padding:9px 12px;color:#fff;background-color:#058eed;font-size:14px}.btn-group li.active[data-v-13036f20]{background-color:#0a6db1}.btn-group li[data-v-13036f20]:hover{cursor:pointer;background-color:#0a6db1}.desc-wrapper[data-v-093909d4]{position:absolute;bottom:0;right:0;padding:8px 18px;width:200px;z-index:9999;background-color:hsla(0,0%,100%,.5)}.desc-wrapper p[data-v-093909d4]{font-size:12px;color:#000}
--------------------------------------------------------------------------------
/dist/css/points.3d02ecf1.css:
--------------------------------------------------------------------------------
1 | .leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{-webkit-transition:-webkit-transform .3s ease-out,opacity .3s ease-in;-webkit-transition:opacity .3s ease-in,-webkit-transform .3s ease-out;transition:opacity .3s ease-in,-webkit-transform .3s ease-out;transition:transform .3s ease-out,opacity .3s ease-in;transition:transform .3s ease-out,opacity .3s ease-in,-webkit-transform .3s ease-out}.leaflet-cluster-spider-leg{-webkit-transition:-webkit-stroke-dashoffset .3s ease-out,-webkit-stroke-opacity .3s ease-in;-webkit-transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in;transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in}.marker-cluster-small{background-color:rgba(181,226,140,.6)}.marker-cluster-small div{background-color:rgba(110,204,57,.6)}.marker-cluster-medium{background-color:rgba(241,211,87,.6)}.marker-cluster-medium div{background-color:rgba(240,194,12,.6)}.marker-cluster-large{background-color:rgba(253,156,115,.6)}.marker-cluster-large div{background-color:rgba(241,128,23,.6)}.leaflet-oldie .marker-cluster-small{background-color:#b5e28c}.leaflet-oldie .marker-cluster-small div{background-color:#6ecc39}.leaflet-oldie .marker-cluster-medium{background-color:#f1d357}.leaflet-oldie .marker-cluster-medium div{background-color:#f0c20c}.leaflet-oldie .marker-cluster-large{background-color:#fd9c73}.leaflet-oldie .marker-cluster-large div{background-color:#f18017}.marker-cluster{background-clip:padding-box;border-radius:20px}.marker-cluster div{width:30px;height:30px;margin-left:5px;margin-top:5px;text-align:center;border-radius:15px;font:12px Helvetica Neue,Arial,Helvetica,sans-serif}.marker-cluster span{line-height:30px}.marker-station{border-radius:50%;-webkit-box-shadow:1px 1px 2px rgba(0,0,0,.5);box-shadow:1px 1px 2px rgba(0,0,0,.5);background-color:#222}
--------------------------------------------------------------------------------
/dist/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zjfcool/leaflet-learn/f928a286eecaa3797ed70bd2e9f2f4ab9de30f10/dist/favicon.ico
--------------------------------------------------------------------------------
/dist/index.html:
--------------------------------------------------------------------------------
1 |
leaflet-learn
--------------------------------------------------------------------------------
/dist/js/app.be980611.js:
--------------------------------------------------------------------------------
1 | (function(e){function t(t){for(var r,o,l=t[0],i=t[1],c=t[2],s=0,u=[];s\r\n \r\n\r\n\r\n\r\n\r\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NavList.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NavList.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./NavList.vue?vue&type=template&id=14f9e054&scoped=true&\"\nimport script from \"./NavList.vue?vue&type=script&lang=js&\"\nexport * from \"./NavList.vue?vue&type=script&lang=js&\"\nimport style0 from \"./NavList.vue?vue&type=style&index=0&id=14f9e054&lang=less&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"14f9e054\",\n null\n \n)\n\nexport default component.exports","\n \n \n \n
\n\n\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/thread-loader/dist/cjs.js!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=6a122ec1&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&lang=less&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue'\nimport Router from 'vue-router'\n\nVue.use(Router)\n\nexport default new Router({\n routes: [\n {\n path: '/',\n name: 'home',\n redirect: {\n name:'geotiff'\n },\n },\n {\n path: '/geotiff',\n name: 'geotiff',\n component: () => import(/* webpackChunkName: \"geotiff\" */ './views/TiffMapLayer.vue')\n },\n {\n path: '/ec',\n name: 'leafletEcharts',\n component: () => import(/* webpackChunkName: \"leafletEcharts\" */ './views/EchartsMapLayer.vue')\n },\n {\n path: '/flow',\n name: 'flow',\n component: () => import(/* webpackChunkName: \"flow\" */ './views/FlowMapLayer.vue')\n },\n {\n path: '/points',\n name: 'points',\n component: () => import(/* webpackChunkName: \"points\" */ './views/PointsMapLayer.vue')\n },\n ]\n})\n","import Vue from 'vue'\r\nimport App from './App.vue'\r\nimport router from './router'\r\nimport { Icon } from 'leaflet'\r\nimport 'leaflet/dist/leaflet.css'\r\ndelete Icon.Default.prototype._getIconUrl;\r\nimport '@/assets/css/main.less';\r\n\r\nIcon.Default.mergeOptions({\r\n iconRetinaUrl: require('leaflet/dist/images/marker-icon-2x.png'),\r\n iconUrl: require('leaflet/dist/images/marker-icon.png'),\r\n shadowUrl: require('leaflet/dist/images/marker-shadow.png')\r\n});\r\n\r\nVue.config.productionTip = false\r\n\r\nnew Vue({\r\n router,\r\n render: h => h(App)\r\n}).$mount('#app')\r\n","import mod from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../node_modules/css-loader/index.js??ref--10-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=less&\"; export default mod; export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../node_modules/css-loader/index.js??ref--10-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&lang=less&\"","import mod from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../node_modules/css-loader/index.js??ref--10-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NavList.vue?vue&type=style&index=0&id=14f9e054&lang=less&scoped=true&\"; export default mod; export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--10-oneOf-1-0!../../node_modules/css-loader/index.js??ref--10-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--10-oneOf-1-2!../../node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./NavList.vue?vue&type=style&index=0&id=14f9e054&lang=less&scoped=true&\""],"sourceRoot":""}
--------------------------------------------------------------------------------
/dist/js/flow~geotiff~leafletEcharts~points.cb32dc6f.js:
--------------------------------------------------------------------------------
1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["flow~geotiff~leafletEcharts~points"],{"07e3":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"0fc9":function(t,e,n){var r=n("3a38"),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},"160f":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"desc-wrapper"},[n("p",[t._v("说明:"+t._s(t.data.content))]),n("a",{attrs:{href:t.data.link,target:"blank"}},[t._v("示例代码")])])},i=[],o={name:"Description",props:{data:{type:Object,default:function(){return{content:"",link:""}}}},data:function(){return{}}},a=o,s=(n("5979"),n("2877")),u=Object(s["a"])(a,r,i,!1,null,"093909d4",null);e["a"]=u.exports},1654:function(t,e,n){"use strict";var r=n("71c1")(!0);n("30f1")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},1691:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"1af6":function(t,e,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"1bc3":function(t,e,n){var r=n("f772");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},"1ec9":function(t,e,n){var r=n("f772"),i=n("e53d").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},"20fd":function(t,e,n){"use strict";var r=n("d9f6"),i=n("aebd");t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},"241e":function(t,e,n){var r=n("25eb");t.exports=function(t){return Object(r(t))}},"25eb":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},2699:function(t,e,n){"use strict";var r=n("e11e"),i=function(t,e){var n;return function(){var r=[],i=arguments.length;while(i--)r[i]=arguments[i];var o=this;n&&clearTimeout(n),n=setTimeout(function(){t.apply(o,r),n=null},e)}},o=function(t){return t&&"function"===typeof t.charAt?t.charAt(0).toUpperCase()+t.slice(1):t},a=function(t,e,n,i){var a=function(i){var a="set"+o(i),s=n[i].type===Object||n[i].type===Array||Array.isArray(n[i].type);n[i].custom&&t[a]?t.$watch(i,function(e,n){t[a](e,n)},{deep:s}):"setOptions"===a?t.$watch(i,function(t,n){Object(r["setOptions"])(e,t)},{deep:s}):e[a]&&t.$watch(i,function(t,n){e[a](t)},{deep:s})};for(var s in n)a(s)},s=function(t){var e={};for(var n in t){var r=t[n];null!==r&&void 0!==r&&(e[n]=r)}return e},u=function(t,e){var n=e.options&&e.options.constructor===Object?e.options:{};t=t&&t.constructor===Object?t:{};var r=s(n);t=s(t);var i=e.$options.props;for(var o in t){var a=i[o]?i[o].default:Symbol("unique");r[o]&&a!==t[o]?(console.warn(o+" props is overriding the value passed in the options props"),r[o]=t[o]):r[o]||(r[o]=t[o])}return r},c={props:{options:{type:Object,default:function(){return{}}}}},f={name:"LMap",mixins:[c],props:{center:{type:[Object,Array],custom:!0,default:function(){return[0,0]}},bounds:{type:[Array,Object],custom:!0,default:null},maxBounds:{type:[Array,Object],default:null},zoom:{type:Number,custom:!0,default:0},minZoom:{type:Number,default:null},maxZoom:{type:Number,default:null},paddingBottomRight:{type:Array,custom:!0,default:null},paddingTopLeft:{type:Array,custom:!0,default:null},padding:{type:Array,custom:!0,default:null},worldCopyJump:{type:Boolean,default:!1},crs:{type:Object,custom:!0,default:function(){return r["CRS"].EPSG3857}},maxBoundsViscosity:{type:Number,default:null},inertia:{type:Boolean,default:null},inertiaDeceleration:{type:Number,default:null},inertiaMaxSpeed:{type:Number,default:null},easeLinearity:{type:Number,default:null},zoomAnimation:{type:Boolean,default:null},zoomAnimationThreshold:{type:Number,default:null},fadeAnimation:{type:Boolean,default:null},markerZoomAnimation:{type:Boolean,default:null},noBlockingAnimations:{type:Boolean,default:!1}},data:function(){return{ready:!1,lastSetCenter:null,lastSetBounds:null,lastSetZoom:null,layerControl:void 0,layersToAdd:[]}},computed:{fitBoundsOptions:function(){var t={};return this.padding?t.padding=this.padding:(this.paddingBottomRight&&(t.paddingBottomRight=this.paddingBottomRight),this.paddingTopLeft&&(t.paddingTopLeft=this.paddingTopLeft)),t}},beforeDestroy:function(){this.mapObject&&this.mapObject.remove()},mounted:function(){var t=this,e=u({minZoom:this.minZoom,maxZoom:this.maxZoom,maxBounds:this.maxBounds,maxBoundsViscosity:this.maxBoundsViscosity,worldCopyJump:this.worldCopyJump,crs:this.crs,center:this.center,zoom:this.zoom,inertia:this.inertia,inertiaDeceleration:this.inertiaDeceleration,inertiaMaxSpeed:this.inertiaMaxSpeed,easeLinearity:this.easeLinearity,zoomAnimation:this.zoomAnimation,zoomAnimationThreshold:this.zoomAnimationThreshold,fadeAnimation:this.fadeAnimation,markerZoomAnimation:this.markerZoomAnimation},this);this.mapObject=Object(r["map"])(this.$el,e),this.setBounds(this.bounds),this.mapObject.on("moveend",i(this.moveEndHandler,100)),r["DomEvent"].on(this.mapObject,this.$listeners),a(this,this.mapObject,this.$options.props),this.ready=!0,this.$emit("leaflet:load"),this.$nextTick(function(){t.$emit("ready",t.mapObject)})},methods:{registerLayerControl:function(t){var e=this;this.layerControl=t,this.mapObject.addControl(t.mapObject),this.layersToAdd.forEach(function(t){e.layerControl.addLayer(t)}),this.layersToAdd=[]},addLayer:function(t,e){void 0!==t.layerType&&(void 0===this.layerControl?this.layersToAdd.push(t):this.layerControl.addLayer(t)),e||this.mapObject.addLayer(t.mapObject)},removeLayer:function(t,e){void 0!==t.layerType&&(void 0===this.layerControl?this.layersToAdd=this.layersToAdd.filter(function(e){return e.name!==t.name}):this.layerControl.removeLayer(t)),e||this.mapObject.removeLayer(t.mapObject)},setZoom:function(t,e){this.mapObject.setZoom(t,{animate:!!this.noBlockingAnimations&&null})},setCenter:function(t,e){if(null!=t){var n=Object(r["latLng"])(t),i=this.lastSetCenter||this.mapObject.getCenter();i.lat===n.lat&&i.lng===n.lng||(this.lastSetCenter=n,this.mapObject.panTo(n,{animate:!!this.noBlockingAnimations&&null}))}},setBounds:function(t,e){if(t){var n=Object(r["latLngBounds"])(t);if(n.isValid()){var i=this.lastSetBounds||this.mapObject.getBounds(),o=!i.equals(n,0);o&&(this.lastSetBounds=n,this.mapObject.fitBounds(n,this.fitBoundsOptions))}}},setPaddingBottomRight:function(t,e){this.paddingBottomRight=t},setPaddingTopLeft:function(t,e){this.paddingTopLeft=t},setPadding:function(t,e){this.padding=t},setCrs:function(t,e){console.log("Changing CRS is not yet supported by Leaflet")},fitBounds:function(t){this.mapObject.fitBounds(t)},moveEndHandler:function(){this.$emit("update:zoom",this.mapObject.getZoom());var t=this.mapObject.getCenter();this.$emit("update:center",t);var e=this.mapObject.getBounds();this.$emit("update:bounds",e)}}};function l(t,e,n,r,i,o,a,s,u,c){"boolean"!==typeof a&&(u=s,s=a,a=!1);var f,l="function"===typeof n?n.options:n;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),r&&(l._scopeId=r),o?(f=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,u(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=f):e&&(f=a?function(){e.call(this,c(this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),f)if(l.functional){var p=l.render;l.render=function(t,e){return f.call(e),p(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,f):[f]}return n}var p=l,d="undefined"!==typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function h(t){return function(t,e){return v(t,e)}}var m=document.head||document.getElementsByTagName("head")[0],y={};function v(t,e){var n=d?e.media||"default":t,r=y[n]||(y[n]={ids:new Set,styles:[]});if(!r.ids.has(t)){r.ids.add(t);var i=e.source;if(e.map&&(i+="\n/*# sourceURL="+e.map.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e.map))))+" */"),r.element||(r.element=document.createElement("style"),r.element.type="text/css",e.media&&r.element.setAttribute("media",e.media),m.appendChild(r.element)),"styleSheet"in r.element)r.styles.push(i),r.element.styleSheet.cssText=r.styles.filter(Boolean).join("\n");else{var o=r.ids.size-1,a=document.createTextNode(i),s=r.element.childNodes;s[o]&&r.element.removeChild(s[o]),s.length?r.element.insertBefore(a,s[o]):r.element.appendChild(a)}}}var b=h,g=f,O=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"vue2leaflet-map"},[t.ready?t._t("default"):t._e()],2)},L=[],S=function(t){t&&t("data-v-2935624e_0",{source:".vue2leaflet-map{height:100%;width:100%}",map:void 0,media:void 0})},x=void 0,j=void 0,T=!1,C=p({render:O,staticRenderFns:L},S,g,x,T,j,b,void 0);e["a"]=C},"294c":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"30f1":function(t,e,n){"use strict";var r=n("b8e3"),i=n("63b6"),o=n("9138"),a=n("35e8"),s=n("481b"),u=n("8f60"),c=n("45f2"),f=n("53e2"),l=n("5168")("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",m="values",y=function(){return this};t.exports=function(t,e,n,v,b,g,O){u(n,e,v);var L,S,x,j=function(t){if(!p&&t in A)return A[t];switch(t){case h:return function(){return new n(this,t)};case m:return function(){return new n(this,t)}}return function(){return new n(this,t)}},T=e+" Iterator",C=b==m,_=!1,A=t.prototype,w=A[l]||A[d]||b&&A[b],B=w||j(b),$=b?C?j("entries"):B:void 0,R="Array"==e&&A.entries||w;if(R&&(x=f(R.call(new t)),x!==Object.prototype&&x.next&&(c(x,T,!0),r||"function"==typeof x[l]||a(x,l,y))),C&&w&&w.name!==m&&(_=!0,B=function(){return w.call(this)}),r&&!O||!p&&!_&&A[l]||a(A,l,B),s[e]=B,s[T]=y,b)if(L={values:C?B:j(m),keys:g?B:j(h),entries:$},O)for(S in L)S in A||o(A,S,L[S]);else i(i.P+i.F*(p||_),e,L);return L}},"32fc":function(t,e,n){var r=n("e53d").document;t.exports=r&&r.documentElement},"335c":function(t,e,n){var r=n("6b4c");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},"35e8":function(t,e,n){var r=n("d9f6"),i=n("aebd");t.exports=n("8e60")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"36c3":function(t,e,n){var r=n("335c"),i=n("25eb");t.exports=function(t){return r(i(t))}},3702:function(t,e,n){var r=n("481b"),i=n("5168")("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},"386b":function(t,e,n){var r=n("5ca1"),i=n("79e5"),o=n("be13"),a=/"/g,s=function(t,e,n,r){var i=String(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+""+e+">"};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},"3a38":function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"40c3":function(t,e,n){var r=n("6b4c"),i=n("5168")("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},"45f2":function(t,e,n){var r=n("d9f6").f,i=n("07e3"),o=n("5168")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},"481b":function(t,e){t.exports={}},"4ee1":function(t,e,n){var r=n("5168")("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(a){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},t(o)}catch(a){}return n}},"50ed":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},5168:function(t,e,n){var r=n("dbdb")("wks"),i=n("62a0"),o=n("e53d").Symbol,a="function"==typeof o,s=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};s.store=r},"53e2":function(t,e,n){var r=n("07e3"),i=n("241e"),o=n("5559")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},"549b":function(t,e,n){"use strict";var r=n("d864"),i=n("63b6"),o=n("241e"),a=n("b0dc"),s=n("3702"),u=n("b447"),c=n("20fd"),f=n("7cd6");i(i.S+i.F*!n("4ee1")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,l,p=o(t),d="function"==typeof this?this:Array,h=arguments.length,m=h>1?arguments[1]:void 0,y=void 0!==m,v=0,b=f(p);if(y&&(m=r(m,h>2?arguments[2]:void 0,2)),void 0==b||d==Array&&s(b))for(e=u(p.length),n=new d(e);e>v;v++)c(n,v,y?m(p[v],v):p[v]);else for(l=b.call(p),n=new d;!(i=l.next()).done;v++)c(n,v,y?a(l,m,[i.value,v],!0):i.value);return n.length=v,n}})},"54a1":function(t,e,n){n("6c1c"),n("1654"),t.exports=n("95d5")},5559:function(t,e,n){var r=n("dbdb")("keys"),i=n("62a0");t.exports=function(t){return r[t]||(r[t]=i(t))}},"584a":function(t,e){var n=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},5979:function(t,e,n){"use strict";var r=n("de5f"),i=n.n(r);i.a},"5b4e":function(t,e,n){var r=n("36c3"),i=n("b447"),o=n("0fc9");t.exports=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),f=o(a,c);if(t&&n!=n){while(c>f)if(s=u[f++],s!=s)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},"62a0":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},"63b6":function(t,e,n){var r=n("e53d"),i=n("584a"),o=n("d864"),a=n("35e8"),s=n("07e3"),u="prototype",c=function(t,e,n){var f,l,p,d=t&c.F,h=t&c.G,m=t&c.S,y=t&c.P,v=t&c.B,b=t&c.W,g=h?i:i[e]||(i[e]={}),O=g[u],L=h?r:m?r[e]:(r[e]||{})[u];for(f in h&&(n=e),n)l=!d&&L&&void 0!==L[f],l&&s(g,f)||(p=l?L[f]:n[f],g[f]=h&&"function"!=typeof L[f]?n[f]:v&&l?o(p,r):b&&L[f]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[u]=t[u],e}(p):y&&"function"==typeof p?o(Function.call,p):p,y&&((g.virtual||(g.virtual={}))[f]=p,t&c.R&&O&&!O[f]&&a(O,f,p)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},"69e4":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("ul",{staticClass:"btn-group"},t._l(t.data,function(e){return n("li",{key:e.label,ref:"btnItem",refInFor:!0,on:{click:function(n){return n.stopPropagation(),t.changeLayer(n,e)}}},[t._v(t._s(e.label))])}),0)},i=[],o=n("75fc"),a=(n("ac6a"),{name:"ButtonGroup",props:{data:{type:Array,default:function(){return[]}}},data:function(){return{}},methods:{changeLayer:function(t,e){Object(o["a"])(this.$refs.btnItem).forEach(function(t){t.classList.remove("active")}),t.currentTarget.classList.add("active"),this.$emit("changeLayer",e)}},mounted:function(){var t=this;this.$nextTick(function(){t.$refs.btnItem[0].click()})}}),s=a,u=(n("ae52"),n("2877")),c=Object(u["a"])(s,r,i,!1,null,"13036f20",null);e["a"]=c.exports},"6b4c":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"6c1c":function(t,e,n){n("c367");for(var r=n("e53d"),i=n("35e8"),o=n("481b"),a=n("5168")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u=c?t?"":void 0:(o=s.charCodeAt(u),o<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536)}}},"75fc":function(t,e,n){"use strict";var r=n("a745"),i=n.n(r);function o(t){if(i()(t)){for(var e=0,n=new Array(t.length);eu)r.f(t,n=a[u++],e[n]);return t}},8436:function(t,e){t.exports=function(){}},"8e60":function(t,e,n){t.exports=!n("294c")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"8f60":function(t,e,n){"use strict";var r=n("a159"),i=n("aebd"),o=n("45f2"),a={};n("35e8")(a,n("5168")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},9003:function(t,e,n){var r=n("6b4c");t.exports=Array.isArray||function(t){return"Array"==r(t)}},9138:function(t,e,n){t.exports=n("35e8")},"95d5":function(t,e,n){var r=n("40c3"),i=n("5168")("iterator"),o=n("481b");t.exports=n("584a").isIterable=function(t){var e=Object(t);return void 0!==e[i]||"@@iterator"in e||o.hasOwnProperty(r(e))}},"9db9":function(t,e,n){},a159:function(t,e,n){var r=n("e4ae"),i=n("7e90"),o=n("1691"),a=n("5559")("IE_PROTO"),s=function(){},u="prototype",c=function(){var t,e=n("1ec9")("iframe"),r=o.length,i="<",a=">";e.style.display="none",n("32fc").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),c=t.F;while(r--)delete c[u][o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[u]=r(t),n=new s,s[u]=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},a40a:function(t,e,n){"use strict";var r=n("e11e"),i=function(t){return t&&"function"===typeof t.charAt?t.charAt(0).toUpperCase()+t.slice(1):t},o=function(t,e,n,o){var a=function(o){var a="set"+i(o),s=n[o].type===Object||n[o].type===Array||Array.isArray(n[o].type);n[o].custom&&t[a]?t.$watch(o,function(e,n){t[a](e,n)},{deep:s}):"setOptions"===a?t.$watch(o,function(t,n){Object(r["setOptions"])(e,t)},{deep:s}):e[a]&&t.$watch(o,function(t,n){e[a](t)},{deep:s})};for(var s in n)a(s)},a=function(t){var e={};for(var n in t){var r=t[n];null!==r&&void 0!==r&&(e[n]=r)}return e},s=function(t,e){var n=e.options&&e.options.constructor===Object?e.options:{};t=t&&t.constructor===Object?t:{};var r=a(n);t=a(t);var i=e.$options.props;for(var o in t){var s=i[o]?i[o].default:Symbol("unique");r[o]&&s!==t[o]?(console.warn(o+" props is overriding the value passed in the options props"),r[o]=t[o]):r[o]||(r[o]=t[o])}return r},u=function(t){var e=!1;while(t&&!e)void 0===t.mapObject?t=t.$parent:e=!0;return t},c={props:{pane:{type:String,default:"overlayPane"},attribution:{type:String,default:null},name:{type:String,custom:!0,default:void 0},layerType:{type:String,custom:!0,default:void 0},visible:{type:Boolean,custom:!0,default:!0}},mounted:function(){this.layerOptions={attribution:this.attribution,pane:this.pane}},beforeDestroy:function(){this.unbindPopup(),this.unbindTooltip(),this.parentContainer.removeLayer(this)},methods:{setAttribution:function(t,e){var n=this.$parent.mapObject.attributionControl;n.removeAttribution(e).addAttribution(t)},setName:function(){this.parentContainer.removeLayer(this),this.visible&&this.parentContainer.addLayer(this)},setLayerType:function(){this.parentContainer.removeLayer(this),this.visible&&this.parentContainer.addLayer(this)},setVisible:function(t){this.mapObject&&(t?this.parentContainer.addLayer(this):this.parentContainer.removeLayer(this))},unbindTooltip:function(){var t=this.mapObject?this.mapObject.getTooltip():null;t&&t.unbindTooltip()},unbindPopup:function(){var t=this.mapObject?this.mapObject.getPopup():null;t&&t.unbindPopup()}}},f={mixins:[c],props:{pane:{type:String,default:"tilePane"},opacity:{type:Number,custom:!1,default:1},zIndex:{type:Number,default:1},tileSize:{type:Number,default:256},noWrap:{type:Boolean,default:!1}},mounted:function(){this.gridLayerOptions=Object.assign({},this.layerOptions,{pane:this.pane,opacity:this.opacity,zIndex:this.zIndex,tileSize:this.tileSize,noWrap:this.noWrap})}},l={mixins:[f],props:{tms:{type:Boolean,default:!1},detectRetina:{type:Boolean,default:!1}},mounted:function(){this.tileLayerOptions=Object.assign({},this.gridLayerOptions,{tms:this.tms,detectRetina:this.detectRetina})},render:function(){return null}},p={props:{options:{type:Object,default:function(){return{}}}}},d={name:"LTileLayer",mixins:[l,p],props:{url:{type:String,default:null},tileLayerClass:{type:Function,default:r["tileLayer"]}},mounted:function(){var t=this,e=s(this.tileLayerOptions,this);this.mapObject=this.tileLayerClass(this.url,e),r["DomEvent"].on(this.mapObject,this.$listeners),o(this,this.mapObject,this.$options.props),this.parentContainer=u(this.$parent),this.parentContainer.addLayer(this,!this.visible),this.$nextTick(function(){t.$emit("ready",t.mapObject)})}};function h(t,e,n,r,i,o,a,s,u,c){"boolean"!==typeof a&&(u=s,s=a,a=!1);var f,l="function"===typeof n?n.options:n;if(t&&t.render&&(l.render=t.render,l.staticRenderFns=t.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),r&&(l._scopeId=r),o?(f=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,u(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=f):e&&(f=a?function(){e.call(this,c(this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),f)if(l.functional){var p=l.render;l.render=function(t,e){return f.call(e),p(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,f):[f]}return n}var m=h,y=d,v=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div")},b=[],g=void 0,O=void 0,L=void 0,S=!1,x=m({render:v,staticRenderFns:b},g,y,O,S,L,void 0,void 0);e["a"]=x},a745:function(t,e,n){t.exports=n("f410")},ac6a:function(t,e,n){for(var r=n("cadf"),i=n("0d58"),o=n("2aba"),a=n("7726"),s=n("32e9"),u=n("84f2"),c=n("2b4c"),f=c("iterator"),l=c("toStringTag"),p=u.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=i(d),m=0;m0?i(r(t),9007199254740991):0}},b54a:function(t,e,n){"use strict";n("386b")("link",function(t){return function(e){return t(this,"a","href",e)}})},b8e3:function(t,e){t.exports=!0},c367:function(t,e,n){"use strict";var r=n("8436"),i=n("50ed"),o=n("481b"),a=n("36c3");t.exports=n("30f1")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},c3a1:function(t,e,n){var r=n("e6f3"),i=n("1691");t.exports=Object.keys||function(t){return r(t,i)}},c8bb:function(t,e,n){t.exports=n("54a1")},d2d5:function(t,e,n){n("1654"),n("549b"),t.exports=n("584a").Array.from},d864:function(t,e,n){var r=n("79aa");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},d9f6:function(t,e,n){var r=n("e4ae"),i=n("794b"),o=n("1bc3"),a=Object.defineProperty;e.f=n("8e60")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},dbdb:function(t,e,n){var r=n("584a"),i=n("e53d"),o="__core-js_shared__",a=i[o]||(i[o]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("b8e3")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},de5f:function(t,e,n){},e4ae:function(t,e,n){var r=n("f772");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},e53d:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},e6f3:function(t,e,n){var r=n("07e3"),i=n("36c3"),o=n("5b4e")(!1),a=n("5559")("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);while(e.length>u)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},f410:function(t,e,n){n("1af6"),t.exports=n("584a").Array.isArray},f772:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}}}]);
2 | //# sourceMappingURL=flow~geotiff~leafletEcharts~points.cb32dc6f.js.map
--------------------------------------------------------------------------------
/dist/wrfout-warp.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zjfcool/leaflet-learn/f928a286eecaa3797ed70bd2e9f2f4ab9de30f10/dist/wrfout-warp.tif
--------------------------------------------------------------------------------
/dist/wrfout.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zjfcool/leaflet-learn/f928a286eecaa3797ed70bd2e9f2f4ab9de30f10/dist/wrfout.tif
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "leaflet-learn",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build"
8 | },
9 | "dependencies": {
10 | "axios": "^0.19.0",
11 | "chroma-js": "^2.0.4",
12 | "core-js": "^2.6.5",
13 | "echarts": "^4.2.1",
14 | "echarts-gl": "^1.1.1",
15 | "georaster": "^0.5.4",
16 | "geotiff": "^1.0.0-beta.6",
17 | "leaflet": "^1.5.1",
18 | "leaflet-raster": "^1.0.0",
19 | "leaflet.markercluster": "^1.4.1",
20 | "leaflet.vectorgrid": "^1.3.0",
21 | "marchingsquares": "^1.3.3",
22 | "plotty": "^0.4.1",
23 | "raster-blaster": "^2.0.1",
24 | "raster-marching-squares": "^0.1.3",
25 | "vue": "^2.6.10",
26 | "vue-router": "^3.0.3",
27 | "vue2-leaflet": "^2.2.1"
28 | },
29 | "devDependencies": {
30 | "@vue/cli-plugin-babel": "^3.0.4",
31 | "@vue/cli-service": "^3.0.4",
32 | "less": "~3.9.0",
33 | "less-loader": "^4.1.0",
34 | "vue-template-compiler": "^2.6.10"
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | autoprefixer: {}
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zjfcool/leaflet-learn/f928a286eecaa3797ed70bd2e9f2f4ab9de30f10/public/favicon.ico
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | leaflet-learn
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/public/wrfout-warp.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zjfcool/leaflet-learn/f928a286eecaa3797ed70bd2e9f2f4ab9de30f10/public/wrfout-warp.tif
--------------------------------------------------------------------------------
/public/wrfout.tif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zjfcool/leaflet-learn/f928a286eecaa3797ed70bd2e9f2f4ab9de30f10/public/wrfout.tif
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
45 |
50 |
--------------------------------------------------------------------------------
/src/assets/css/main.less:
--------------------------------------------------------------------------------
1 | @import './reset.less';
2 | body,html{
3 | width: 100%;
4 | height: 100%;
5 | overflow: hidden;
6 | }
--------------------------------------------------------------------------------
/src/assets/css/reset.less:
--------------------------------------------------------------------------------
1 | /* http://meyerweb.com/eric/tools/css/reset/
2 | v2.0 | 20110126
3 | License: none (public domain)
4 | */
5 |
6 | html, body, div, span, applet, object, iframe,
7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre,
8 | a, abbr, acronym, address, big, cite, code,
9 | del, dfn, em, img, ins, kbd, q, s, samp,
10 | small, strike, strong, sub, sup, tt, var,
11 | b, u, i, center,
12 | dl, dt, dd, ol, ul, li,
13 | fieldset, form, label, legend,
14 | table, caption, tbody, tfoot, thead, tr, th, td,
15 | article, aside, canvas, details, embed,
16 | figure, figcaption, footer, header, hgroup,
17 | menu, nav, output, ruby, section, summary,
18 | time, mark, audio, video {
19 | margin: 0;
20 | padding: 0;
21 | border: 0;
22 | font-size: 100%;
23 | font: inherit;
24 | vertical-align: baseline;
25 | }
26 | /* HTML5 display-role reset for older browsers */
27 | article, aside, details, figcaption, figure,
28 | footer, header, hgroup, menu, nav, section {
29 | display: block;
30 | }
31 | body {
32 | line-height: 1;
33 | }
34 | ol, ul {
35 | list-style: none;
36 | }
37 | blockquote, q {
38 | quotes: none;
39 | }
40 | blockquote:before, blockquote:after,
41 | q:before, q:after {
42 | content: '';
43 | content: none;
44 | }
45 | table {
46 | border-collapse: collapse;
47 | border-spacing: 0;
48 | }
--------------------------------------------------------------------------------
/src/assets/js/flow.js:
--------------------------------------------------------------------------------
1 | export default [{
2 | "data": [-0.30222785, -0.07627644, -2.7960372, 2.0317574, -1.567374, -0.5886703, -3.6673226, -4.5004377, -6.042044, -3.046016, -1.7118272, -1.9261519999999999, -7.631124999999999, -4.896447, -3.4617226, -4.662855, -4.6019707, -6.892468, -3.9468532000000005, -4.6575317, -4.8416505, -2.8395903, -8.658896, -10.947058, -7.5981274, -10.989529, -13.131278, -7.212124, -3.8849719, -2.4808443, -3.9345365, -5.299887, 0.87940747, -10.981563, 1.0313671, 3.288607, -2.6159787, 0.07580153, -1.4710585, -1.0971342, -1.714846, -3.2284074, -5.571011, -5.258147, -6.194861, -3.933249, -3.4916189, -2.1253319, -3.7345383, -5.4561777, -5.908906, -5.584992, -5.8547535, -4.127123, -6.6301403, -6.3630977, -4.522815, -8.755764, -6.831741999999999, -8.815977, -14.000385, -10.698075, -13.391046000000001, -7.057295, -4.2999563, -2.5085018, -11.172770500000002, -11.585625, -10.027168, -16.076069, 2.2186213, 3.2304319999999995, -1.0502782, -1.1572964, -1.8483714, -2.6251352, -3.0547192, -4.2163715, -7.0815434, -5.0882134, -4.841242, -5.6668234, -5.9411345, -3.4098063, -4.4819107, -7.252822, -5.785415, -7.8464065, -6.3950876999999995, -7.156702, -6.3616557, -7.1325746, -9.922786, -6.5691338, -6.3959546000000005, -5.9627075, -7.562526, -7.8306227, -5.9800363, -5.44168, -6.536447, -5.3345579999999995, -6.782316, -9.710467, -11.494768999999998, -3.7195616, -3.415134, 2.8092468, -2.1927211, -1.8464501, -1.2997704, -3.143733, -3.5554623999999997, -0.23384432, -7.053312, -6.0552506, -6.956107, -9.145696, -8.394314, -6.571485000000001, -8.698334, -8.746545, -8.3279705, -8.908764, -9.199483, -9.096724, -14.006921, -13.509782, -8.660203, -8.731574, -6.50444, -7.365107, -4.757646, -6.4630666, -6.0859227, -9.018039, -11.414847, -8.77141, -10.579785, -8.977726, -16.44754, -5.7033687, -1.4534233, -0.85236377, -0.3965669, -1.5105209, -2.4942791, -3.235033, -3.508985, -2.9213407, -5.580651, -6.191117, -7.857492, -9.184271, -9.34119, -9.734034, -8.538164, -10.533629, -8.886705, -10.17781, -10.039218, -14.277095, -16.50091, -15.168876, -13.922433999999999, -9.838254999999998, -11.933223, -7.996314500000001, -7.571666699999999, -6.403832, -7.849581, -12.49937, -8.387172, -8.367245, -3.8564208, -14.142977000000002, -5.779801, -11.712437999999999, 0.4426337, 2.1309726, -0.3577282, -1.3869386, -1.7380306, -4.6874413, -4.245999, -3.7241232, -5.5689692, -5.6515017, -8.767838, -4.2049603, -9.864552, -9.051159, -9.988333, -10.879147, -11.076842, -15.8182745, -16.209696, -9.828181, -17.780685, -15.123459, -14.337392, -15.135980000000002, -16.16065, -12.956188000000001, -10.966977, -15.598162999999998, -10.240626, -12.468919, -6.7574573, -6.662415, -5.786081, -16.664145, -14.894994, -3.1056836, -2.819031, -4.0440974, -0.9885206000000001, -3.6991324000000003, -2.4201913, -3.4650087, -1.1847057, -2.5062804, -5.232146, -6.438182, -9.198989, -6.085451600000001, -9.623526, -9.787595, -9.239453, -13.407615999999999, -11.974501, -12.710695, -14.33561, -11.986046, -12.568327, -12.0142565, -15.55852, -13.924824, -13.755274, -12.786179, -10.948469, -15.227983, -10.958, -10.731347, -4.993996, -11.327468, -14.604204000000001, -10.098695, -4.010624, -9.0175, -6.017103, -1.5782297, -0.38849306, 0.94970655, 0.15573743, -0.22691387, -0.15292019, -0.3309265, -3.7608304, -6.213329300000001, -6.671400000000001, -7.98764, -7.7780952, -8.154763, -10.415916, -11.94189, -12.622187, -15.318173999999999, -12.665603, -12.100802, -9.892161, -12.934650999999999, -14.199032, -13.755312999999997, -13.596695, -13.509070999999999, -11.343938, -13.20742, -17.659468, -14.03448, -11.544376, -12.6637535, -12.053164, -10.773777, -14.483784, -7.582480399999999, -3.7899141, -8.725952, 1.373498, 2.075791, 2.93756, 1.1622312, 1.7627163, 1.9173814, 0.50050956, -6.474259, -6.3738585, -4.906899, -5.768655, -6.5456967, -10.0871725, -10.383278, -12.061551, -13.954181, -13.884847, -11.749965, -14.056797, -15.772397999999999, -16.901943, -15.798241, -14.143058, -10.9339695, -13.145076, -7.971623999999999, -13.86301, -11.373139, -9.00923, -16.90379, -7.966004, -14.555538, -10.841956, -8.466915, -6.4695716, -6.426217, 4.1085105, 5.470828, 4.655689, 5.6841607, 5.3555098, 5.6889567, 4.9403234, 1.1185485, -2.011038, -4.170611, -4.1679726, -2.8638918, -3.7225862, -5.812437, -7.8945127, -7.715505, -8.255372, -7.5772085, -6.4270754, -7.839651, -11.590811, -12.872581, -16.730371, -15.3445215, -14.671335, -13.92366, -18.852568, -16.722685, -16.624792, -13.057446, -9.499532, -13.747869, -9.962047, -6.652784, -6.7305474, -8.508676, 6.3584213, 7.882786300000001, 7.127898, 7.7460637, 7.839466600000001, 8.575963, 8.77239, 10.248095, 4.873358, 1.659964, -1.4118358, 2.6322608, 2.5748696, -1.9413629999999997, -5.369070999999999, -4.4199266, -5.1836176, -5.9435534, -4.495544, -4.6516333, -8.760984, -8.763209, -9.297249, -12.353680000000002, -12.7050905, -16.365957, -13.476941999999998, -12.932735, -13.200951, -7.074566000000001, -16.793074, -13.548923, -11.683235, -9.698375, -12.5590105, -10.197311, 7.82414, 9.187459, 9.258504, 9.391424, 7.7048297, 8.859812, 9.977452, 8.8795395, 7.029475699999999, 7.35306, 4.1318545, 2.6921265, 4.1223383, 1.4350373000000003, -1.0555682, -1.8918461, -3.0158355, -4.564614, -5.0619864, -4.6067033, -1.6554414, -5.7881694, -7.791704, -9.855534, -10.332789, -11.83997, -12.233367, -10.453801, -12.46378, -11.209506999999999, -11.305405, -6.3322253, -9.256776, -9.025813, -5.72888, -8.683098, 10.380856, 11.083796, 11.851326, 12.419681000000002, 15.322046, 15.186813, 9.93001, 9.148402, 8.021515, 6.5083156, 5.3793726, 4.4615984, 7.7769737, 5.470431, 0.3080072, -0.8684668000000001, -1.6446306, -2.0359037, -3.098375, -2.3372178, -1.0729601, -1.1726595, -3.9975783999999996, -5.355278, -13.148437, -12.863247, -12.9057665, -11.839013, -10.752302, -9.584148, -9.876706, -8.996605, -1.4288214, -8.00929, -7.7270465, -11.394476, 10.601004, 12.583267000000001, 14.980428, 15.71597, 15.531395, 14.149649, 9.101653, 11.9618435, 10.73598, 13.40712, 7.9273243, 8.297094, 6.9279213, 8.461854, 4.2813497, 1.9481986, -0.85488474, -1.472639, -0.97886586, -1.4862812, -2.907086, 0.97888786, 2.835716, -1.8210065, -3.5417469, -10.414838, -11.515534, -11.462544, -10.370624000000001, -8.39148, -6.2465024, -8.239518, -7.7794642, -4.7896366, -8.960681, -11.438813, 12.248466, 14.140214000000002, 15.817989, 18.69819, 16.536444, 15.751321, 14.183084, 15.915657000000001, 16.034966, 16.117565, 11.871718, 9.698375, 14.905851000000002, 7.81, 6.4189973, 5.160649, 2.279421, 1.3266448, -1.050267, -1.0677581, -1.8926988, -0.7344011, 2.148311, -1.3072107, 2.3294332, -1.5536066, -8.025846, -9.576141, -9.189835, -6.4774804, -5.9499593, -7.8424252999999995, -5.572038, -1.1653154, -8.492818, -12.242615, 8.653955, 10.716371, 15.828812, 20.94372, 17.428232, 20.68149, 16.475471, 18.904371, 14.124286000000001, 13.908542999999998, 13.722052, 11.011854000000001, 9.413011, 10.786439, 7.582312, 5.856065, 3.8415291, 2.3874288000000004, 0.94078594, 1.4484158, 0.053146849999999995, -0.51283467, 2.5998232, 2.8092663, -1.6535155999999998, -5.387414, -7.873447, -4.9465303, -6.5347767, -9.707713, -8.058498, -8.123619, -6.5002112, -5.125056, -6.0880075, -9.057997, 14.690760999999998, 10.465778, 10.112347, 17.148956, 16.398108, 17.23063, 17.131124, 15.777686999999998, 12.550811, 11.79078, 13.065919, 17.328875, 12.1809025, 10.119553, 7.5141644, 6.3483477, 4.9464173, 3.2622702, 3.9926789, 3.4159067, 2.2451344, 2.0897927, 4.2550316, -0.671117, 1.653753, -0.64155585, -6.239144, -7.843941699999999, -4.4218717, -6.9408545, -5.971553, -7.061118, -5.244096, -6.260296, -6.888406799999999, -11.087353, 15.0986595, 14.661007, 16.134968, 15.857203, 15.308901, 12.50594, 14.602736, 14.023461, 15.553767, 13.399824, 15.3402, 14.7119665, 18.616272, 9.168356, 6.431050000000001, 5.901013000000001, 5.1335907, 3.00176, 3.7485538, 4.356145, 2.3355663, 0.48138747, 7.7481003, -0.7137726000000001, 3.6846168, 1.9237328, -3.9158971, -2.8626455999999996, -7.291345999999999, -9.882995, -8.173914, -8.996101, -4.5950584, -7.896725, -5.936985, -10.330488, 16.025948, 15.514995, 16.928299, 10.87442, 11.502991, 9.853108, 7.5129848, 11.16263, 10.78089, 12.945909, 14.6100025, 14.642854999999999, 9.353162, 7.402542, 5.33534, 5.452443, 4.6179624, 3.8083563000000002, 3.3498714, 4.067756, 4.935992, 2.155767, 4.2390966, 1.5434076, 2.9378278, -2.750604, -3.2275121, -0.9963354000000001, -2.9303522, -3.9959794999999994, -6.345877, -8.287877, -6.6869955, -8.275309, -6.130503999999999, -6.0685105, 16.896357, 14.383537, 8.729098, 10.616485, 12.215248, 9.737172, 8.898691, 9.179026, 7.491542, 10.1303625, 9.570712, 9.103676, 6.456612, 6.4536915, 5.440685, 4.9344473, 4.6255145, 3.279742, 3.094505, -0.8424576, 10.414814, 2.7435737, 2.7898886, 2.2230175, -0.409782, -3.9029636000000005, -3.9150681, -3.8073347, -2.1667264, -5.68561, -3.9693614999999998, -5.701552, -5.2562895, -5.174189, -3.4773738, -3.9791062, 8.739133, 11.7272835, 12.388947, 9.099435, 10.196636, 12.312082, 11.607647, 9.146772, 7.759599, 6.912785, 6.626958, 6.0836644, 5.500877, 4.21314, 4.1440964, 3.855831, 4.943925, 4.632624, 5.813878, 4.637707, 4.7158794, 4.0136166, 0.66889185, 1.77321, -0.9400446400000001, -1.536288, -1.547254, -6.18672, -6.621334, -4.2069526, -6.9274797, -3.168458, -3.7528558, -2.436908, -2.0308826, -3.4447138000000006, 8.979608, 9.89224, 7.246464, 9.006302, 11.775483, 10.840844, 8.490229, 8.3367605, 7.378745, 7.164951, 5.9042854, 4.604193, 5.0066323, 5.586218, 5.373853, 5.177605599999999, 5.1478157, 6.026521, 1.9731929, 7.4761524, 4.235482, 4.2528133, 3.775594, -7.0373445, -5.9265594, -1.5897814000000001, -2.2808151, -14.442784, -5.9576364, -7.427662, 0.26862717, -1.9107833, -2.2142107, -5.837408, -6.0283246, -3.7530563, 8.568565, 8.412625, 8.714214, 8.2121, 5.131028, 7.481558000000001, 8.287352, 7.3703876, 7.93878, 7.2446675, 4.9134483, 4.488997, 4.515564, 5.09696, 5.8541203, 5.3544044, 4.98927, 4.0731373, 2.1504145, 4.946328, 4.004287, 5.7779193, 3.7874322, -1.9238849999999998, -6.086701, -4.063804, -1.97339, -9.255207, -18.36166, -18.72702, -8.179413, -11.784415, -5.224531, -2.8867621, -0.13458616, -0.779307, 7.9264092, 7.7378054, 6.5223913, 6.2736526, 5.929367, 5.063628, 5.118856, 5.525779, 5.140124, 4.3412137, 4.4613576, 3.9240901000000004, 4.131577, 5.333538, 5.5649323, 4.5563364, 2.517078, 4.435128, 3.24647, 5.012512, 4.2344236, 5.1384683, 2.0245643, -1.6985587, 1.0475075, 0.23145987, -0.8315626400000001, -4.2867703, -6.1178174, -10.435373999999998, -10.229055, -8.973521, -7.687105999999999, -5.1166034, -3.7713163, -1.4259194, 6.1105375, 7.9083076, 5.663729, 5.985857500000001, 5.2230363, 3.018837, 4.288658, 4.7152357, 3.1890733, 3.1019619, 3.3499950999999997, 4.397704, 5.3285155, 5.0743003, 3.0996344, 3.6731899, 3.26218, 3.2511744, 3.2024415, 4.8246593, 4.377672, 1.7505797, 9.731949, -2.2185082, 1.1974912, 1.8902786, 1.8752398000000001, -0.6773747, -2.696395, -4.053578, -5.408911, -7.561839600000001, -6.286468500000001, -5.2869363, -3.658139, -1.9677792000000003, 3.9845119, 4.822228, 5.252212, 3.2754416, 3.8699415, 2.2598197, 2.600452, 4.3915186, 2.9585328, 2.7579787, 5.131325, 6.6857266, 2.963123, 4.41985, 2.8636806, 3.0109448, 3.7171645, 3.6240697, 6.576575, 6.0701385, 3.7566817, 5.582535, 2.5834079, 4.34909, 4.898875, 2.7427209999999995, 1.4675317, 0.9919801000000001, -0.83228034, -1.9338557, -2.6490917, -2.4823198, -3.5785418, -5.833485, -3.4843473, -3.9216242, 1.1374571, 4.817854999999999, 6.6382756, 3.0499754, 0.23820566, 1.62733, 5.681035, 5.089682, 3.498573, 4.820727, 5.052132, 3.6881201, 2.2775114, 2.3967197, 4.7725816, 0.8175827, -0.773976, 0.20511766, 1.1501558, 10.649638, 2.293312, 5.1596413, 2.7743495, 5.9607368, 4.958679, 1.3523755, -0.4045928, 0.12029281, 0.112398684, -0.5611959, -0.7296049, -1.5093018, -3.4453888, -4.3812957, -5.3420324, -1.4948353, 3.8327878, 3.7062685, 3.7615046999999997, 0.1264231, 1.1367595, 3.7570198, 4.539107, 4.6654453, 3.8495727, 4.766495, 2.8430362, 0.5961241, 2.1407995, 2.087906, 1.5388913000000002, 1.789718, 3.7838778, 2.1669087, 2.255978, 3.520335, 1.0380257, 7.649943399999999, 6.6072545, 3.452495, 2.406232, 0.7748973, -1.1791624, -2.1152627, -1.4803932, -1.870629, -1.597869, -2.081413, -1.4009022, -3.872349, -2.0503552, -2.5000587, 2.6400468, 3.9739156, 4.2073803, 4.781490000000001, 3.1139412, 3.8722146, 4.175908, 3.734818, 5.1647406, 1.6772662000000003, 3.7144046, 6.2781568, 5.141693, 2.109976, 3.8943222, 4.6321254, 3.5363824, 3.813911, -0.41361982, 0.05011311, 1.7969646, 3.1277301, 2.73558, 3.1952057000000003, 0.6333234, -4.708459, -6.5264482, -6.714789, -4.609224, -3.4746437, -2.8844628, -2.4481516, -1.6369348, -2.4208457, -3.093845, -3.4717014, 4.7685213, 3.646932, 6.938155, 6.5840707, 5.063081, 4.523337, 4.381412, 4.6280365, 5.711009, 6.638343299999999, 6.789972, 5.1217217, 4.3282623, 4.040925, 4.385219, 4.669296, 3.1449282, 2.404363, -0.5891218, -5.411563, -4.804917, -0.0651742, 0.985764, -4.0492654, -7.218368, -6.7655163, -7.2378507, -6.0705843, -6.0475254, -5.168117, -5.453983299999999, -4.4369073, -3.4253156, -3.7684667, -4.0434346, -3.461065, 4.899572, 5.056188, 6.1809964, 5.433689599999999, 4.528926, 3.6169465000000005, 6.6479435, 8.283411, 6.5441327, 7.069991, 6.026032999999999, 4.7162895, 4.5647225, 4.4931674, 4.468739, 2.2709353, 0.94403905, 1.6855643, -2.4913926, 0.21495337999999997, -2.9042819, -3.1426115, -6.984136999999999, -7.821518, -8.040067, -7.5458355, -8.350817, -7.787464999999999, -6.5592113, -6.941735, -7.0422363, -6.2311015, -6.3595877, -6.64385, -6.148030999999999, -5.8331494, 1.1353319, 3.1258223, 2.9081957, 1.5495018, 2.8772798, 4.0048285, 5.044118, 4.538095, 5.5538063, 5.1485763, 4.5697355, 4.5889316, 4.450329, 5.068789499999999, 1.9143596, 2.8092883, 6.421429, 2.3000197, -1.6216719, -4.441254, -4.0251975, -4.504083, -12.053924, -12.757186, -13.869713, -13.038429, -14.1267805, -12.0117855, -9.014244, -7.951012, -8.106226, -7.9957104, -8.247105, -8.409553, -7.230598399999999, -6.138907],
3 | "header": {
4 | "dx": 0.5,
5 | "dy": 0.5,
6 | "gridDefinitionTemplateName": "Latitude_Longitude",
7 | "gridUnits": "degrees",
8 | "la1": 54,
9 | "la2": 38,
10 | "lo1": 118,
11 | "lo2": 136,
12 | "meta": {
13 | "date": "2019-08-21-10-00-00"
14 | },
15 | "numberPoints": 1152,
16 | "nx": 36,
17 | "ny": 32,
18 | "parameterCategory": 2,
19 | "parameterNumber": 2,
20 | "parameterNumberName": "U-component_of_wind",
21 | "parameterUnit": "m.s-1",
22 | "surface2Type": 255
23 | }
24 | }, {
25 | "data": [-3.0789797, -5.5599804, -7.937320699999999, -3.9912107, -6.741268, -6.2533035, -2.1906853, -2.0371094, -4.980026, -4.968289, -5.275344, -4.63629, -6.3915896, -6.131676, -5.1629095, -5.072289, -6.5159020000000005, -6.7807746, -7.62525, -6.908684, -6.04333, -6.348941, -1.7099195, -6.8217316, -8.255754, -8.51109, -7.5365973, -7.639525, -4.611391, -7.3703117, -5.8146334, -2.0420961, -5.1760674, 2.5156584, -3.7368257, -4.2905235, -7.411089, -6.2163844, -8.041196, -5.3937287, -6.779027500000001, -4.277049, -4.476726, -5.06428, -6.033529, -6.230547, -5.787893, -5.3201504, -5.276911999999999, -7.429174, -6.035245, -5.627009, -4.931605, -5.2564096, -4.4025936, -3.559746, -1.0092068, -1.9433979000000001, -1.6017776, -6.2876816, -8.414543, -5.092816, -7.3401465, -8.233831, -6.168976, -4.4286585, 0.42187637000000006, -0.731741, -3.1561081, -3.9303286, -6.524719, -6.864127999999999, -7.1261954, -6.91133, -7.559099, -7.4139576, -7.7075640000000005, -8.881979, -7.385234, -7.1912584, -7.559481, -7.3922253, -7.7728340000000005, -8.734486, -7.369954, -7.1774707, -5.617099, -5.015904, -4.147541, -3.680964, -3.028658, -4.067097, -5.249614, -6.42738, -4.796213, -5.730352, -5.440202, -3.2350333, -7.329525, -5.452761, -3.622078, -0.37929836000000006, 4.219473, 1.9359, 3.8528988, -0.7437802, -6.7455473, -7.2220926, -5.950218999999999, -8.019566, -8.006297, -10.556922, -9.709821, -9.013153, -10.231726, -10.837726, -9.668611, -8.899012, -9.564696, -10.612153, -10.503105, -8.280056, -6.952835000000001, -7.063594999999999, -7.1043835, -6.2512693, -8.079989, -6.8869205, -5.495166, -6.946565599999999, -7.091411, -5.1140304, -5.0445094, -3.9570148000000005, -3.0177612, 3.4802673, 2.5184104, -0.22017002, 3.3988853, -0.4073499, -4.924208, -1.9664836, -3.3917456, -4.7713675, -9.920899, -10.398587, -11.306067, -11.334077, -11.362639, -10.755879, -10.642452, -10.831234, -8.5624695, -9.081757, -11.218958, -8.955429, -9.994106, -8.389217, -8.853286, -9.041814, -8.622524, -8.943837, -7.9028735, -6.437172, -7.288684999999999, -6.1738853, -6.843147000000001, -3.9692050000000005, -4.1153193, -4.0432153, 0.5778576, 2.1645648, 0.8182962000000001, -4.026249, -3.9826685999999993, 0.13851471, -4.950096, -6.125462, -7.336227, -7.042268, -11.571953, -10.293187000000001, -12.696295, -15.302124, -12.885357000000003, -10.961018, -10.316571, -8.695453, -7.646163500000001, -7.810195, -10.431507, -10.540836, -9.914119, -8.51181, -8.84299, -9.998153, -8.369008, -5.410347, -7.9601135, -6.87851, -7.230259, -6.2986836, -6.3852077, -6.433706, -3.7891328000000004, 2.2437165, 3.0511491, 2.313312, -0.96481943, -1.0312752, -3.584934, 4.14445, -1.5335169, -4.2647653, -3.2372217, -4.1386228, -12.603168, -15.105865999999999, -15.900702, -16.745176, -13.073873, -9.209137, -10.495989, -8.653983, -9.238882, -9.710068, -10.746271, -9.793339, -9.0117, -9.542311, -8.897393, -7.9184017, -6.7491765, -4.867691, -5.0900245, -4.582285, -1.3718414, -1.0779058, -0.66925776, -0.916089, 1.8324605, -1.9078254, -0.9788305, -2.7456648, -1.9476855, 3.8587375, 2.230251, -7.295689000000001, -8.615553, 1.7391549, -1.2530192, -4.0507894, -12.329815, -14.850611, -14.9314165, -13.127779, -14.043028, -10.76008, -8.419776, -7.579212, -11.138304, -11.072538, -11.603627, -10.832397, -9.889736, -10.015531000000001, -10.180034, -5.5646276, -5.880698, -5.5212617, -3.591013, -1.7103188, 1.1196203, 1.240636, 1.675961, 0.38578844, -0.5996211, 2.3806448, 2.7718875, 1.1066084, -1.2908682, -1.3042005, 0.45085993, 2.007723, 2.0188205, -0.8984627, -2.7052777, 1.4378048, -11.709653, -14.889517, -14.100442, -14.632448, -14.72716, -10.844005, -9.547457, -12.423447, -11.596216, -10.821869, -11.2689295, -10.195536, -9.195467, -7.483868, -5.695954, -4.1119947, -3.8919775, -2.6238925, -0.6437915, 1.3834509, 1.8417306, 3.7116249, 3.0627236, 2.854805, 0.64595425, -0.06407481, 0.08436472, -3.5001025, -0.8036353, 3.5837214, -0.19917647999999996, 0.14082089, -2.444844, -6.6889586, -7.5170784, -5.4982944, -11.453128, -11.984513000000002, -12.800992, -12.214332, -12.280501999999998, -9.969003, -13.209316, -9.121354, -12.884733999999998, -10.049013, -10.124788, -6.265137700000001, -2.9518979, -3.5320158, -0.73607934, 1.1740521, 1.0587378, 0.08639326, 1.4189055, 1.1804465, 4.156656, 5.0228825, 5.690372, 5.0350223, 5.8962274, 4.5846205, 6.611556000000001, 2.2527432, 2.00754, -1.3690586, -3.3937557, -5.00599, -6.4789863, -5.7091956, -5.1141677, -3.4939783, -10.210704, -11.907915, -10.936068, -11.066555, -11.69168, -11.777687, -10.21981, -10.273765, -11.307077, -4.573006, -2.0789466, -1.8539013, -0.1888585, 1.8365521000000002, 1.8240969, 4.3403234, 4.1658735, 6.054475, 5.4118657, 4.4170094, 5.9403424, 4.899127, 4.4369917, 5.1538296, 4.8172636, 4.088621, 2.480842, 0.60087574, -0.5384453, 4.152098, -3.8203082, -5.7182565, -4.1284337, -3.2821696, -0.5978039, 1.1651508, -10.05897, -10.376886, -10.434746, -10.276726, -8.674087, -8.540525, -10.176517, -7.8572826, -4.0279126, -0.7299269, -0.9370069, 1.371326, 2.9141178, 3.0506794, 4.88395, 5.0064926, 3.8787453, 4.1517777, 4.6359143, 6.775769700000001, 4.0864353, 3.858023, 0.85696673, 2.7821105, 3.3407338, 4.719736, 5.500027, 3.919635, 5.929036, 3.3770885, 3.2536676, 2.9614563, 0.37954116000000004, 2.5637636, -1.0139303, 1.9710351, -11.032189, -10.412189499999998, -9.882308, -10.58787, -11.577955, -11.887365, -8.088546, -5.940986999999999, -3.5143182000000004, -0.8830503000000001, 0.95314693, 3.9117892, 3.2728982, 3.3303013, 4.552278, 5.678634, 5.834628, 5.501172, 6.232852, 5.629973, 6.45279, 7.196792599999999, 4.8912764, 4.299423, 4.5586276, 2.1356063, 4.264007, 5.7079277, 6.094826, 4.2026863, 4.4930043, 1.9405758, 3.0194438000000003, 6.6919637, 4.340395, 5.7906985, -9.033588, -10.101688, -10.102573, -8.668954, -8.914093, -7.759515, -4.6855416, -4.816685, -1.9139372999999997, -0.48440956999999996, 2.2890022000000005, 4.2992177, 1.8350129, 1.565335, 7.5596733, 6.537843700000001, 6.0973196, 7.0834856, 8.872483, 5.900911, 4.3698277, 4.7963557, 3.7438815, 5.9632369999999995, 7.602383, 6.463893, 6.458785, 7.3069367, 8.611318, 7.418961, 5.197536000000001, 4.4918804, 6.945198, 5.991060700000001, 5.781392, 8.834727, -12.080211, -10.044869, -9.184381, -9.723493, -7.746672599999999, -4.1412463, -5.228937, -2.8768373, -1.9777777, 0.39918658, 2.6567674, 2.7773883, 4.284464, 5.8236365, 6.193608, 8.310426, 6.7797956, 8.467429, 8.050558, 5.4284945, 6.8885517, 5.1544952, 5.4667044, 5.562818, 8.14912, 9.92976, 4.0833955, 6.937898, 9.034045, 7.884211, 6.805184, 7.927951000000001, 7.274246, 5.8370337, 2.1759908, 0.41383331999999995, -10.318931, -9.706842, -9.7556305, -10.250101, -7.5375485, -6.934102, -1.9391667000000001, -5.4506903, -1.3758463, -0.6525065, 2.4459314, 4.897009, 2.3707178, 5.4802675, 7.3475347, 8.208431, 7.9325166, 6.4922333, 6.3994236, 7.1613092, 4.9309435, 3.3156579, 3.9552217, 5.393205, 3.7324712, 4.548633, 10.389562, 12.269530999999999, 8.922026, 9.785019, 6.816673, 7.341483, 7.074221, 8.434268, 7.025874, 4.891085, -11.895107, -10.132264, -9.478374, -11.867729, -8.730246, -7.0781684, -5.231926, -2.890583, 0.29822594, 2.3196898, 3.6484413, 1.5847451999999997, 2.0914385, 3.7516766, 5.496641, 7.198250300000001, 8.486415, 7.5795393, 10.455829, 8.424309, 5.633487, 7.827312, 9.197831, 4.1915846, 10.250076, 10.36579, 11.186085, 4.8772693, 7.0644894, 8.632421, 8.330773, 8.930344, 7.0546193, 7.831458, 6.4182057, 6.7481265, -10.377584, -9.909162, -10.607494, -12.332261, -9.4396305, -6.076232, -5.4363685, -1.9967734999999998, -1.7691145, 0.69587725, 0.63216996, 0.46555328, 2.0878534, 3.3298593, 6.7447753, 7.698808699999999, 6.967575, 8.469521, 7.2081575, 6.0711117, 7.970914, 8.024318, 8.278823, 5.6390076, 10.602462, 9.045229, 12.975721, 13.847593, 15.270957, 8.689216, 9.69135, 9.79266, 6.8371267, 8.504275, 4.4359026, 5.140962, -8.523081, -9.43947, -11.819151, -7.67523, -6.2417192, -5.865842999999999, -5.4329963, -5.4045925, -4.7014008, -1.8500874999999999, -2.644497, -1.4247363, 3.2395961, 6.38095, 5.704828, 7.298905, 7.644958, 8.202046, 9.569602, 7.002179599999999, 7.2918754, 4.519868, 4.891927, 8.054683, 9.930245, 11.637895, 8.360124, 11.623459, 12.537159, 9.016465, 4.7585936, 7.1340337, 4.961294, 6.528987000000001, 4.948431, 1.0563707, -12.463669, -5.206902, -4.0884156, -3.3435640000000006, -3.468532, -4.145276, -4.831724, -6.0461907, -6.9578866999999995, -8.442546, -5.839797, -1.5836374, 3.7258894, 5.6106563, 7.6934443, 6.2960343, 6.6468773, 9.556055, 4.206529, 6.1604486, 6.742808299999999, 6.521958999999999, 6.5408454, 7.0045033, 6.497093, 7.900558, 11.3671055, 16.175894, 13.348267, 4.7182775, -1.7899668, 5.6348195, 5.932907600000001, 4.084482, 1.2685504, -3.9473486, -7.731573000000001, -6.037198, -6.644376800000001, -4.78509, -4.507959, -4.336961, -3.5347855, -2.5324368, -2.4489503, -1.0208561, 0.536794, 2.2800262, 5.4529085, 6.577241, 6.4070683, 6.4053626, 8.477705, 7.741992, 4.3259497, 4.4884624, 4.091406, 3.7824743, 4.0175233, 6.9442787, 9.940789, 9.1507225, 15.282264, 15.732664000000002, 14.624564, 14.759774, 12.599502999999999, 12.4419565, 8.725664, 2.8416076, -0.8082683, 0.6181626, -4.8266416, -5.389849, -5.019174, -4.7276673, -4.0663476, -4.253822, -3.3249772, -2.8907986, -0.730076, 0.06634848, 2.8243506, 5.6981792, 8.076627, 7.751995, 7.982953, 8.111902, 5.7723255, 3.9974869999999996, 7.4837074, 6.736291400000001, 4.404695, 4.4006095, 3.5060174, 6.140728, 6.624033, 10.5117, 4.9178166, 15.970066, 6.8877563, 5.544283, -0.29518747, 0.71949327, -1.2484392, -4.486608, -0.90882117, 2.5594182, -4.7562838, -4.4160147, -5.069322, -3.978449, -3.3291693, -2.9276695, -1.2287328, 0.8160388, 3.1625338, 5.22153, 6.3510528, 6.5757785, 6.4622707, 7.5214367, 6.738883, 3.8988292, 3.260795, 8.339951, 4.371192, 5.3439374, 2.0654767, 2.7592797, 4.306889, 7.4341044, 1.0844159, 2.0983448, 7.774857, 10.227014, 6.4614506, 3.6996553, -3.2990832, -6.5299153, -3.5443823, -0.3019222, 0.420127, 2.147457, -3.4551122, -6.8304462, -5.71816, -5.109309, -3.1545506, -3.5141656, -1.3449324, 1.124681, 2.4622788, 4.291692, 5.6829906, 7.667707, 4.5272064, 2.6426759, 2.8822088, 5.6881356, 6.874759, 5.4374833, 5.672069499999999, 7.0537615, 2.8170142, 0.15066412, 5.865202, 7.5185676, 5.8526745, 14.670670499999998, 15.198944000000001, 15.304357, 13.871644, 9.459374, 8.811486, 5.269406, 4.054546, 4.7185907, 5.099273, 5.0507927, -3.7590095999999997, -6.496294, -3.0697324, -1.9518074000000003, -1.2146505, 0.8063169, 2.0935428, 4.547964, 4.812607, 4.477107, 5.6178985, 5.216468, 2.4458225, 0.43531314, 2.5612836, 2.928411, 2.8927193, 7.0184193, 4.02503, 5.187821, 3.5567245, 5.2614107, 1.5853201, 10.612533, 19.645575, 19.454021, 19.661638, 18.015146, 13.566617, 11.724917, 9.770878, 8.024757, 7.235357, 6.349665999999999, 5.018327, 6.4036603, -3.0886207, -3.2019221999999994, -1.6526095, 1.0845525, 1.2756234, 3.6301515, 8.981664, 6.842740999999999, 6.963286, 4.120705, -0.26746932, 0.8043435, 4.2107916, 5.481639, 5.6914973, 6.5627947, 4.4046345, 7.908763999999999, 7.1794653, 6.6267734, -0.7641727, 1.9762439, 6.973046, 17.736788, 20.489845, 19.536198, 19.412964, 19.552422, 16.983587, 15.233655, 11.639286, 10.550274, 9.00266, 6.791324, 7.137808, 9.244431, -3.5648112000000003, -1.9206165999999998, 1.2240505, -0.26458332, 8.147816, 6.50242, 11.980076, 9.427463, 3.5286803, 3.5025218, 1.5720341, 3.1958284, 6.2704825, 5.5939283, 4.216781, 5.885511400000001, 3.992417, 5.3240447, 4.797714, 5.5839086, 5.465261, 2.4238493, 7.385672, 13.387313, 17.902403, 18.3098, 18.760077, 18.80787, 17.605595, 15.98458, 13.428898, 11.093584, 12.333068, 11.210634, 9.44566, 7.4695177, -0.24043240000000002, -1.9995140999999998, -2.7387886, 4.10908, 5.167147, 8.827245, 8.157205, 6.069759999999999, 2.7482169, -0.33248442, 4.452758, 6.524636300000001, 5.8806534, 5.8066745, 4.2670517, 4.197075, 0.917683, 3.841418, 3.2287545, 1.397279, 3.8596137, 10.153441, 12.870182, 14.556922999999998, 14.312451, 15.507008000000003, 15.82417, 15.519812, 15.910745, 16.244389, 16.517206, 14.697529, 14.04194, 14.531520999999998, 11.697627, 9.070185, 0.8161576, -0.51638305, -0.69946074, 10.547572, 7.367267, 6.1461077, 4.0681543, -0.42916593, -2.6648312, 5.935316, 5.090498, 9.20676, 7.788019700000001, 2.0918806, 1.8290342, 1.5471411, 1.6467595, 0.9817121600000001, 4.1547956, 5.229782, 5.6990485, 8.755022, 10.269967, 11.199758000000001, 13.832992, 18.208998, 19.823967, 18.40238, 16.73715, 13.8224745, 12.544897, 11.926219, 11.049936, 11.440164, 11.835273, 9.077654, 2.693368, 4.562344, 7.624897000000001, 6.274132, 5.4523854, 2.1046205, 1.1253798, -0.49051827000000003, 11.046476, 10.30902, 8.438698, 7.1359277, 6.0773325, 2.244993, 0.37980148, -1.7465729, -0.14862789, -0.84518695, 0.8620094, -1.9261711, 5.7401557, 7.383390000000001, 10.589265, 14.977327, 16.013906, 16.496658, 15.380758, 14.690000999999999, 14.750250000000001, 14.334436, 12.273781, 11.522155, 11.16083, 10.205888, 8.164192, 7.1376405, 2.1723073, 2.2310975, 1.3352782999999997, 1.8615139, 1.9822736, 2.370318, 3.9271846, 8.635646, 7.2161703, 5.7015786, 4.463652, 2.6946263, 1.7868369, -0.9270133, -2.707545, -2.2070303, -4.2640495, -3.2503050000000004, -2.5199955, 2.5407047, 6.2834845, 11.558461, 12.721826000000002, 14.443784, 15.77897, 16.359318, 16.947273, 18.363304, 15.547066, 13.93402, 11.011012, 10.709936, 8.940388, 8.097682, 7.048816700000001, 5.169947, -0.6972476, -1.224744, -0.5647324, 1.8150595, 2.8211715, 1.4449211, 0.6678481, 2.6071837, 2.0705862, 2.1312625, 0.94048786, 0.18626612, -0.8285625, -3.951262, -1.7923422, -2.92881, -5.1590214, 1.3054594, 3.352088, 4.2862473, 1.2697245, 7.164206, 9.149325, 11.441915, 11.224844, 9.872348, 6.052628, 10.4689045, 13.813523, 15.716641, 14.600424, 14.254697, 11.134397, 6.8803782, 4.6715603, 2.032635],
26 | "header": {
27 | "dx": 0.5,
28 | "dy": 0.5,
29 | "gridDefinitionTemplateName": "Latitude_Longitude",
30 | "gridUnits": "degrees",
31 | "la1": 54,
32 | "la2": 38,
33 | "lo1": 118,
34 | "lo2": 136,
35 | "meta": {
36 | "date": "2019-08-21-10-00-00"
37 | },
38 | "numberPoints": 1152,
39 | "nx": 36,
40 | "ny": 32,
41 | "parameterCategory": 2,
42 | "parameterNumber": 3,
43 | "parameterNumberName": "V-component_of_wind",
44 | "parameterUnit": "m.s-1",
45 | "surface2Type": 255
46 | }
47 | }]
--------------------------------------------------------------------------------
/src/assets/js/points.js:
--------------------------------------------------------------------------------
1 | export default [{
2 | "name": "海门",
3 | "value": [121.15, 31.89, 9]
4 | }, {
5 | "name": "鄂尔多斯",
6 | "value": [109.781327, 39.608266, 12]
7 | }, {
8 | "name": "招远",
9 | "value": [120.38, 37.35, 12]
10 | }, {
11 | "name": "舟山",
12 | "value": [122.207216, 29.985295, 12]
13 | }, {
14 | "name": "齐齐哈尔",
15 | "value": [123.97, 47.33, 14]
16 | }, {
17 | "name": "盐城",
18 | "value": [120.13, 33.38, 15]
19 | }, {
20 | "name": "赤峰",
21 | "value": [118.87, 42.28, 16]
22 | }, {
23 | "name": "青岛",
24 | "value": [120.33, 36.07, 18]
25 | }, {
26 | "name": "乳山",
27 | "value": [121.52, 36.89, 18]
28 | }, {
29 | "name": "金昌",
30 | "value": [102.188043, 38.520089, 19]
31 | }, {
32 | "name": "泉州",
33 | "value": [118.58, 24.93, 21]
34 | }, {
35 | "name": "莱西",
36 | "value": [120.53, 36.86, 21]
37 | }, {
38 | "name": "日照",
39 | "value": [119.46, 35.42, 21]
40 | }, {
41 | "name": "胶南",
42 | "value": [119.97, 35.88, 22]
43 | }, {
44 | "name": "南通",
45 | "value": [121.05, 32.08, 23]
46 | }, {
47 | "name": "拉萨",
48 | "value": [91.11, 29.97, 24]
49 | }, {
50 | "name": "云浮",
51 | "value": [112.02, 22.93, 24]
52 | }, {
53 | "name": "梅州",
54 | "value": [116.1, 24.55, 25]
55 | }, {
56 | "name": "文登",
57 | "value": [122.05, 37.2, 25]
58 | }, {
59 | "name": "上海",
60 | "value": [121.48, 31.22, 25]
61 | }, {
62 | "name": "攀枝花",
63 | "value": [101.718637, 26.582347, 25]
64 | }, {
65 | "name": "威海",
66 | "value": [122.1, 37.5, 25]
67 | }, {
68 | "name": "承德",
69 | "value": [117.93, 40.97, 25]
70 | }, {
71 | "name": "厦门",
72 | "value": [118.1, 24.46, 26]
73 | }, {
74 | "name": "汕尾",
75 | "value": [115.375279, 22.786211, 26]
76 | }, {
77 | "name": "潮州",
78 | "value": [116.63, 23.68, 26]
79 | }, {
80 | "name": "丹东",
81 | "value": [124.37, 40.13, 27]
82 | }, {
83 | "name": "太仓",
84 | "value": [121.1, 31.45, 27]
85 | }, {
86 | "name": "曲靖",
87 | "value": [103.79, 25.51, 27]
88 | }, {
89 | "name": "烟台",
90 | "value": [121.39, 37.52, 28]
91 | }, {
92 | "name": "福州",
93 | "value": [119.3, 26.08, 29]
94 | }, {
95 | "name": "瓦房店",
96 | "value": [121.979603, 39.627114, 30]
97 | }, {
98 | "name": "即墨",
99 | "value": [120.45, 36.38, 30]
100 | }, {
101 | "name": "抚顺",
102 | "value": [123.97, 41.97, 31]
103 | }, {
104 | "name": "玉溪",
105 | "value": [102.52, 24.35, 31]
106 | }, {
107 | "name": "张家口",
108 | "value": [114.87, 40.82, 31]
109 | }, {
110 | "name": "阳泉",
111 | "value": [113.57, 37.85, 31]
112 | }, {
113 | "name": "莱州",
114 | "value": [119.942327, 37.177017, 32]
115 | }, {
116 | "name": "湖州",
117 | "value": [120.1, 30.86, 32]
118 | }, {
119 | "name": "汕头",
120 | "value": [116.69, 23.39, 32]
121 | }, {
122 | "name": "昆山",
123 | "value": [120.95, 31.39, 33]
124 | }, {
125 | "name": "宁波",
126 | "value": [121.56, 29.86, 33]
127 | }, {
128 | "name": "湛江",
129 | "value": [110.359377, 21.270708, 33]
130 | }, {
131 | "name": "揭阳",
132 | "value": [116.35, 23.55, 34]
133 | }, {
134 | "name": "荣成",
135 | "value": [122.41, 37.16, 34]
136 | }, {
137 | "name": "连云港",
138 | "value": [119.16, 34.59, 35]
139 | }, {
140 | "name": "葫芦岛",
141 | "value": [120.836932, 40.711052, 35]
142 | }, {
143 | "name": "常熟",
144 | "value": [120.74, 31.64, 36]
145 | }, {
146 | "name": "东莞",
147 | "value": [113.75, 23.04, 36]
148 | }, {
149 | "name": "河源",
150 | "value": [114.68, 23.73, 36]
151 | }, {
152 | "name": "淮安",
153 | "value": [119.15, 33.5, 36]
154 | }, {
155 | "name": "泰州",
156 | "value": [119.9, 32.49, 36]
157 | }, {
158 | "name": "南宁",
159 | "value": [108.33, 22.84, 37]
160 | }, {
161 | "name": "营口",
162 | "value": [122.18, 40.65, 37]
163 | }, {
164 | "name": "惠州",
165 | "value": [114.4, 23.09, 37]
166 | }, {
167 | "name": "江阴",
168 | "value": [120.26, 31.91, 37]
169 | }, {
170 | "name": "蓬莱",
171 | "value": [120.75, 37.8, 37]
172 | }, {
173 | "name": "韶关",
174 | "value": [113.62, 24.84, 38]
175 | }, {
176 | "name": "嘉峪关",
177 | "value": [98.289152, 39.77313, 38]
178 | }, {
179 | "name": "广州",
180 | "value": [113.23, 23.16, 38]
181 | }, {
182 | "name": "延安",
183 | "value": [109.47, 36.6, 38]
184 | }, {
185 | "name": "太原",
186 | "value": [112.53, 37.87, 39]
187 | }, {
188 | "name": "清远",
189 | "value": [113.01, 23.7, 39]
190 | }, {
191 | "name": "中山",
192 | "value": [113.38, 22.52, 39]
193 | }, {
194 | "name": "昆明",
195 | "value": [102.73, 25.04, 39]
196 | }, {
197 | "name": "寿光",
198 | "value": [118.73, 36.86, 40]
199 | }, {
200 | "name": "盘锦",
201 | "value": [122.070714, 41.119997, 40]
202 | }, {
203 | "name": "长治",
204 | "value": [113.08, 36.18, 41]
205 | }, {
206 | "name": "深圳",
207 | "value": [114.07, 22.62, 41]
208 | }, {
209 | "name": "珠海",
210 | "value": [113.52, 22.3, 42]
211 | }, {
212 | "name": "宿迁",
213 | "value": [118.3, 33.96, 43]
214 | }, {
215 | "name": "咸阳",
216 | "value": [108.72, 34.36, 43]
217 | }, {
218 | "name": "铜川",
219 | "value": [109.11, 35.09, 44]
220 | }, {
221 | "name": "平度",
222 | "value": [119.97, 36.77, 44]
223 | }, {
224 | "name": "佛山",
225 | "value": [113.11, 23.05, 44]
226 | }, {
227 | "name": "海口",
228 | "value": [110.35, 20.02, 44]
229 | }, {
230 | "name": "江门",
231 | "value": [113.06, 22.61, 45]
232 | }, {
233 | "name": "章丘",
234 | "value": [117.53, 36.72, 45]
235 | }, {
236 | "name": "肇庆",
237 | "value": [112.44, 23.05, 46]
238 | }, {
239 | "name": "大连",
240 | "value": [121.62, 38.92, 47]
241 | }, {
242 | "name": "临汾",
243 | "value": [111.5, 36.08, 47]
244 | }, {
245 | "name": "吴江",
246 | "value": [120.63, 31.16, 47]
247 | }, {
248 | "name": "石嘴山",
249 | "value": [106.39, 39.04, 49]
250 | }, {
251 | "name": "沈阳",
252 | "value": [123.38, 41.8, 50]
253 | }, {
254 | "name": "苏州",
255 | "value": [120.62, 31.32, 50]
256 | }, {
257 | "name": "茂名",
258 | "value": [110.88, 21.68, 50]
259 | }, {
260 | "name": "嘉兴",
261 | "value": [120.76, 30.77, 51]
262 | }, {
263 | "name": "长春",
264 | "value": [125.35, 43.88, 51]
265 | }, {
266 | "name": "胶州",
267 | "value": [120.03336, 36.264622, 52]
268 | }, {
269 | "name": "银川",
270 | "value": [106.27, 38.47, 52]
271 | }, {
272 | "name": "张家港",
273 | "value": [120.555821, 31.875428, 52]
274 | }, {
275 | "name": "三门峡",
276 | "value": [111.19, 34.76, 53]
277 | }, {
278 | "name": "锦州",
279 | "value": [121.15, 41.13, 54]
280 | }, {
281 | "name": "南昌",
282 | "value": [115.89, 28.68, 54]
283 | }, {
284 | "name": "柳州",
285 | "value": [109.4, 24.33, 54]
286 | }, {
287 | "name": "三亚",
288 | "value": [109.511909, 18.252847, 54]
289 | }, {
290 | "name": "自贡",
291 | "value": [104.778442, 29.33903, 56]
292 | }, {
293 | "name": "吉林",
294 | "value": [126.57, 43.87, 56]
295 | }, {
296 | "name": "阳江",
297 | "value": [111.95, 21.85, 57]
298 | }, {
299 | "name": "泸州",
300 | "value": [105.39, 28.91, 57]
301 | }, {
302 | "name": "西宁",
303 | "value": [101.74, 36.56, 57]
304 | }, {
305 | "name": "宜宾",
306 | "value": [104.56, 29.77, 58]
307 | }, {
308 | "name": "呼和浩特",
309 | "value": [111.65, 40.82, 58]
310 | }, {
311 | "name": "成都",
312 | "value": [104.06, 30.67, 58]
313 | }, {
314 | "name": "大同",
315 | "value": [113.3, 40.12, 58]
316 | }, {
317 | "name": "镇江",
318 | "value": [119.44, 32.2, 59]
319 | }, {
320 | "name": "桂林",
321 | "value": [110.28, 25.29, 59]
322 | }, {
323 | "name": "张家界",
324 | "value": [110.479191, 29.117096, 59]
325 | }, {
326 | "name": "宜兴",
327 | "value": [119.82, 31.36, 59]
328 | }, {
329 | "name": "北海",
330 | "value": [109.12, 21.49, 60]
331 | }, {
332 | "name": "西安",
333 | "value": [108.95, 34.27, 61]
334 | }, {
335 | "name": "金坛",
336 | "value": [119.56, 31.74, 62]
337 | }, {
338 | "name": "东营",
339 | "value": [118.49, 37.46, 62]
340 | }, {
341 | "name": "牡丹江",
342 | "value": [129.58, 44.6, 63]
343 | }, {
344 | "name": "遵义",
345 | "value": [106.9, 27.7, 63]
346 | }, {
347 | "name": "绍兴",
348 | "value": [120.58, 30.01, 63]
349 | }, {
350 | "name": "扬州",
351 | "value": [119.42, 32.39, 64]
352 | }, {
353 | "name": "常州",
354 | "value": [119.95, 31.79, 64]
355 | }, {
356 | "name": "潍坊",
357 | "value": [119.1, 36.62, 65]
358 | }, {
359 | "name": "重庆",
360 | "value": [106.54, 29.59, 66]
361 | }, {
362 | "name": "台州",
363 | "value": [121.420757, 28.656386, 67]
364 | }, {
365 | "name": "南京",
366 | "value": [118.78, 32.04, 67]
367 | }, {
368 | "name": "滨州",
369 | "value": [118.03, 37.36, 70]
370 | }, {
371 | "name": "贵阳",
372 | "value": [106.71, 26.57, 71]
373 | }, {
374 | "name": "无锡",
375 | "value": [120.29, 31.59, 71]
376 | }, {
377 | "name": "本溪",
378 | "value": [123.73, 41.3, 71]
379 | }, {
380 | "name": "克拉玛依",
381 | "value": [84.77, 45.59, 72]
382 | }, {
383 | "name": "渭南",
384 | "value": [109.5, 34.52, 72]
385 | }, {
386 | "name": "马鞍山",
387 | "value": [118.48, 31.56, 72]
388 | }, {
389 | "name": "宝鸡",
390 | "value": [107.15, 34.38, 72]
391 | }, {
392 | "name": "焦作",
393 | "value": [113.21, 35.24, 75]
394 | }, {
395 | "name": "句容",
396 | "value": [119.16, 31.95, 75]
397 | }, {
398 | "name": "北京",
399 | "value": [116.46, 39.92, 79]
400 | }, {
401 | "name": "徐州",
402 | "value": [117.2, 34.26, 79]
403 | }, {
404 | "name": "衡水",
405 | "value": [115.72, 37.72, 80]
406 | }, {
407 | "name": "包头",
408 | "value": [110, 40.58, 80]
409 | }, {
410 | "name": "绵阳",
411 | "value": [104.73, 31.48, 80]
412 | }, {
413 | "name": "乌鲁木齐",
414 | "value": [87.68, 43.77, 84]
415 | }, {
416 | "name": "枣庄",
417 | "value": [117.57, 34.86, 84]
418 | }, {
419 | "name": "杭州",
420 | "value": [120.19, 30.26, 84]
421 | }, {
422 | "name": "淄博",
423 | "value": [118.05, 36.78, 85]
424 | }, {
425 | "name": "鞍山",
426 | "value": [122.85, 41.12, 86]
427 | }, {
428 | "name": "溧阳",
429 | "value": [119.48, 31.43, 86]
430 | }, {
431 | "name": "库尔勒",
432 | "value": [86.06, 41.68, 86]
433 | }, {
434 | "name": "安阳",
435 | "value": [114.35, 36.1, 90]
436 | }, {
437 | "name": "开封",
438 | "value": [114.35, 34.79, 90]
439 | }, {
440 | "name": "济南",
441 | "value": [117, 36.65, 92]
442 | }, {
443 | "name": "德阳",
444 | "value": [104.37, 31.13, 93]
445 | }, {
446 | "name": "温州",
447 | "value": [120.65, 28.01, 95]
448 | }, {
449 | "name": "九江",
450 | "value": [115.97, 29.71, 96]
451 | }, {
452 | "name": "邯郸",
453 | "value": [114.47, 36.6, 98]
454 | }, {
455 | "name": "临安",
456 | "value": [119.72, 30.23, 99]
457 | }, {
458 | "name": "兰州",
459 | "value": [103.73, 36.03, 99]
460 | }, {
461 | "name": "沧州",
462 | "value": [116.83, 38.33, 100]
463 | }, {
464 | "name": "临沂",
465 | "value": [118.35, 35.05, 103]
466 | }, {
467 | "name": "南充",
468 | "value": [106.110698, 30.837793, 104]
469 | }, {
470 | "name": "天津",
471 | "value": [117.2, 39.13, 105]
472 | }, {
473 | "name": "富阳",
474 | "value": [119.95, 30.07, 106]
475 | }, {
476 | "name": "泰安",
477 | "value": [117.13, 36.18, 112]
478 | }, {
479 | "name": "诸暨",
480 | "value": [120.23, 29.71, 112]
481 | }, {
482 | "name": "郑州",
483 | "value": [113.65, 34.76, 113]
484 | }, {
485 | "name": "哈尔滨",
486 | "value": [126.63, 45.75, 114]
487 | }, {
488 | "name": "聊城",
489 | "value": [115.97, 36.45, 116]
490 | }, {
491 | "name": "芜湖",
492 | "value": [118.38, 31.33, 117]
493 | }, {
494 | "name": "唐山",
495 | "value": [118.02, 39.63, 119]
496 | }, {
497 | "name": "平顶山",
498 | "value": [113.29, 33.75, 119]
499 | }, {
500 | "name": "邢台",
501 | "value": [114.48, 37.05, 119]
502 | }, {
503 | "name": "德州",
504 | "value": [116.29, 37.45, 120]
505 | }, {
506 | "name": "济宁",
507 | "value": [116.59, 35.38, 120]
508 | }, {
509 | "name": "荆州",
510 | "value": [112.239741, 30.335165, 127]
511 | }, {
512 | "name": "宜昌",
513 | "value": [111.3, 30.7, 130]
514 | }, {
515 | "name": "义乌",
516 | "value": [120.06, 29.32, 132]
517 | }, {
518 | "name": "丽水",
519 | "value": [119.92, 28.45, 133]
520 | }, {
521 | "name": "洛阳",
522 | "value": [112.44, 34.7, 134]
523 | }, {
524 | "name": "秦皇岛",
525 | "value": [119.57, 39.95, 136]
526 | }, {
527 | "name": "株洲",
528 | "value": [113.16, 27.83, 143]
529 | }, {
530 | "name": "石家庄",
531 | "value": [114.48, 38.03, 147]
532 | }, {
533 | "name": "莱芜",
534 | "value": [117.67, 36.19, 148]
535 | }, {
536 | "name": "常德",
537 | "value": [111.69, 29.05, 152]
538 | }, {
539 | "name": "保定",
540 | "value": [115.48, 38.85, 153]
541 | }, {
542 | "name": "湘潭",
543 | "value": [112.91, 27.87, 154]
544 | }, {
545 | "name": "金华",
546 | "value": [119.64, 29.12, 157]
547 | }, {
548 | "name": "岳阳",
549 | "value": [113.09, 29.37, 169]
550 | }, {
551 | "name": "长沙",
552 | "value": [113, 28.21, 175]
553 | }, {
554 | "name": "衢州",
555 | "value": [118.88, 28.97, 177]
556 | }, {
557 | "name": "廊坊",
558 | "value": [116.7, 39.53, 193]
559 | }, {
560 | "name": "菏泽",
561 | "value": [115.480656, 35.23375, 194]
562 | }, {
563 | "name": "合肥",
564 | "value": [117.27, 31.86, 229]
565 | }, {
566 | "name": "武汉",
567 | "value": [114.31, 30.52, 273]
568 | }, {
569 | "name": "大庆",
570 | "value": [125.03, 46.58, 279]
571 | }]
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zjfcool/leaflet-learn/f928a286eecaa3797ed70bd2e9f2f4ab9de30f10/src/assets/logo.png
--------------------------------------------------------------------------------
/src/components/ButtonGroup.vue:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
40 |
41 |
--------------------------------------------------------------------------------
/src/components/Description.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
说明:{{data.content}}
4 |
示例代码
5 |
6 |
7 |
8 |
25 |
26 |
--------------------------------------------------------------------------------
/src/components/FlowLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
51 |
52 |
--------------------------------------------------------------------------------
/src/components/LinesLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/src/components/MarkerClusterLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
54 |
61 |
62 |
--------------------------------------------------------------------------------
/src/components/NavList.vue:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
21 |
22 |
--------------------------------------------------------------------------------
/src/components/ScatterLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/src/components/StaticFlowLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
42 |
43 |
--------------------------------------------------------------------------------
/src/components/TiffToCanvasLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
60 |
--------------------------------------------------------------------------------
/src/components/TiffToGeojsonLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
192 |
193 |
--------------------------------------------------------------------------------
/src/components/TiffToGridLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
94 |
--------------------------------------------------------------------------------
/src/components/TiffToImageLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
146 |
147 |
--------------------------------------------------------------------------------
/src/components/WindyLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import App from './App.vue'
3 | import router from './router'
4 | import { Icon } from 'leaflet'
5 | import 'leaflet/dist/leaflet.css'
6 | delete Icon.Default.prototype._getIconUrl;
7 | import '@/assets/css/main.less';
8 |
9 | Icon.Default.mergeOptions({
10 | iconRetinaUrl: require('leaflet/dist/images/marker-icon-2x.png'),
11 | iconUrl: require('leaflet/dist/images/marker-icon.png'),
12 | shadowUrl: require('leaflet/dist/images/marker-shadow.png')
13 | });
14 |
15 | Vue.config.productionTip = false
16 |
17 | new Vue({
18 | router,
19 | render: h => h(App)
20 | }).$mount('#app')
21 |
--------------------------------------------------------------------------------
/src/plugins/func.wind.js:
--------------------------------------------------------------------------------
1 | import { WindLayer } from './ocean.weather.wind'
2 |
3 | export class FuncWind {
4 |
5 | constructor(map) {
6 | this._map = map;
7 | this._findValData={}
8 | this._attribution = L.control.attribution({
9 | prefix:"no data",
10 | position:"bottomleft"
11 | }).addTo(this._map);
12 |
13 | }
14 |
15 | start(results) {
16 | this.getDataCallback(results)
17 | }
18 |
19 | stop() {
20 | if(this._map.hasLayer(this._layer)) {
21 | this._map.removeLayer(this._layer);
22 | }
23 | this._attribution.remove()
24 | this._map.off('mousemove');
25 | }
26 |
27 | showTooltip(e){
28 | const {lat,lng} = e.latlng;
29 | const arr = this._findValData[`${Math.floor(lat)},${Math.floor(lng)}`];
30 | if(arr){
31 | this._attribution.setPrefix(`经度:${arr[1]},纬度:${arr[0]},风速:${arr[2]},风向:${arr[3]}`)
32 | }else{
33 | this._attribution.setPrefix(`no data`)
34 | }
35 | }
36 |
37 | getDataCallback (results) {
38 | var datas = results;
39 | var config = {
40 | lat: '0',
41 | lng: '1',
42 | value: '2',
43 | dir: '3',
44 | data: datas
45 | };
46 | datas.forEach(item=>{
47 | this._findValData[`${Math.floor(item[0])},${Math.floor(item[1])}`]=item;
48 | })
49 | if(this._map.hasLayer(this._layer)) {
50 | this._map.removeLayer(this._layer);
51 | }
52 |
53 | this._layer = new WindLayer({}, config);
54 | this._map.addLayer(this._layer);
55 | this._map.on('mousemove',this.showTooltip.bind(this))
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/plugins/georaster-layer-for-leaflet-interpotations.js:
--------------------------------------------------------------------------------
1 | //"use strict";
2 |
3 | var chroma = require("chroma-js");
4 |
5 | var L = window.L;
6 |
7 | var GeoRasterLayer = L.GridLayer.extend({
8 |
9 | initialize: function initialize(options) {
10 | try {
11 | console.log("starting GeoRasterLayer.initialize with", options);
12 | options = Object.assign({
13 | keepBuffer: 25,
14 | resolution: 2**5,
15 | updateWhenZooming: false,
16 | interpolation: false
17 | },options)
18 |
19 |
20 |
21 | var georaster = options.georaster;
22 | this.georaster = georaster;
23 |
24 | this.scale = options.color?options.color:chroma.scale('RdYlBu');
25 |
26 |
27 | /*
28 | Unpacking values for use later.
29 | We do this in order to increase speed.
30 | */
31 | this._maxs = georaster.maxs;
32 | this._mins = georaster.mins;
33 | this._ranges = georaster.ranges;
34 | this._no_data_value = georaster.noDataValue;
35 | this._pixelWidth = georaster.pixelWidth;
36 | this._pixelHeight = georaster.pixelHeight;
37 | this._rasters = georaster.values;
38 | this._tiff_width = georaster.width;
39 | this._tiff_height = georaster.height;
40 | this._xmin = georaster.xmin;
41 | this._ymin = georaster.ymin;
42 | this._xmax = georaster.xmax;
43 | this._ymax = georaster.ymax;
44 | // this._map = null
45 | this._popup = L.popup();
46 |
47 | // console.log("georaster.ymin:", georaster.ymin);
48 | var southWest = L.latLng(georaster.ymin, georaster.xmin);
49 | var northEast = L.latLng(georaster.ymax, georaster.xmax);
50 | this._bounds = L.latLngBounds(southWest, northEast);
51 | // console.log("this._bounds:", this._bounds);
52 | options.bounds = this._bounds;
53 | L.setOptions(this, options);
54 |
55 | /*
56 | Caching the constant tile size, so we don't recalculate everytime we
57 | create a new tile
58 | */
59 | var tileSize = this.getTileSize();
60 |
61 | this._tile_height = tileSize.y;
62 | this._tile_width = tileSize.x;
63 | } catch (error) {
64 | console.error("ERROR initializing GeoTIFFLayer", error);
65 | }
66 | },
67 |
68 | createTile: function createTile(coords) {
69 |
70 | var no_data_value = this._no_data_value;
71 | var pixelWidth = this._pixelWidth;
72 | var pixelHeight = this._pixelHeight;
73 | var rasters = this._rasters;
74 | var scale = this.scale;
75 | var xmin = this._xmin;
76 | var ymin = this._ymin;
77 | var xmax = this._xmax;
78 | var ymax = this._ymax;
79 |
80 | var tile = L.DomUtil.create('canvas', 'leaflet-tile');
81 | tile.height = this._tile_height;
82 | tile.width = this._tile_width;
83 |
84 | // get a canvas context and draw something on it using coords.x, coords.y and coords.z
85 | var context = tile.getContext('2d');
86 |
87 | var bounds = this._tileCoordsToBounds(coords);
88 |
89 | //if (debug_level >= 1) console.log("bounds:", bounds);
90 |
91 | var xmin_of_tile = bounds.getWest();
92 | var xmax_of_tile = bounds.getEast();
93 | var ymin_of_tile = bounds.getSouth();
94 | var ymax_of_tile = bounds.getNorth();
95 | //if (debug_level >= 1) console.log("ymax_of_tile:", ymax_of_tile);
96 | var resolution = this.options.resolution;
97 |
98 | resolution = 128
99 | var number_of_rectangles_across = resolution;
100 | var number_of_rectangles_down = resolution;
101 |
102 | var height_of_rectangle_in_pixels = this._tile_height / number_of_rectangles_down;
103 | //if (debug_level >= 1) console.log("height_of_rectangle_in_pixels:", height_of_rectangle_in_pixels);
104 | var width_of_rectangle_in_pixels = this._tile_width / number_of_rectangles_across;
105 | //if (debug_level >= 1) console.log("width_of_rectangle:", width_of_rectangle_in_pixels);
106 |
107 | var height_of_rectangle_in_degrees = (ymax_of_tile - ymin_of_tile) / number_of_rectangles_down;
108 | //if (debug_level >= 1) console.log("height_of_rectangle_in_degrees:", height_of_rectangle_in_degrees);
109 | var width_of_rectangle_in_degrees = (xmax_of_tile - xmin_of_tile) / number_of_rectangles_across;
110 | //if (debug_level >= 1) console.log("width_of_rectangle_in_degrees:", width_of_rectangle_in_degrees);
111 |
112 | //if (debug_level >= 1) console.log("ymax of raster:", ymax);
113 |
114 | var number_of_pixels_per_rectangle = this._tile_width / 8;
115 |
116 | for (var h = 0; h < number_of_rectangles_down; h++) {
117 | var lat = ymax_of_tile - (h + 0.5) * height_of_rectangle_in_degrees;
118 |
119 | for (var w = 0; w < number_of_rectangles_across; w++) {
120 | var lng = xmin_of_tile + (w + 0.5) * width_of_rectangle_in_degrees;
121 |
122 | if (lat > ymin && lat < ymax && lng > xmin && lng < xmax
123 | //&& this.isContain(lng,lat)
124 | ) {
125 | let x_in_raster_pixels = Math.floor( (lng - xmin) / pixelWidth );
126 | let y_in_raster_pixels = Math.floor( (ymax - lat) / pixelHeight );
127 | let values = rasters.map(raster => raster[y_in_raster_pixels][x_in_raster_pixels]);
128 | let color;
129 | if(values[0]==no_data_value){
130 | color ='rgba(0,0,0,0)'
131 | } else{
132 | let value = this.options.interpolation?this.interpolatedValueAtIndexes((lng - xmin) / pixelWidth,(ymax - lat) / pixelHeight):values[0]
133 | color = scale(value).hex();
134 | }
135 | context.fillStyle = color;
136 |
137 | context.fillRect(w * width_of_rectangle_in_pixels, h * height_of_rectangle_in_pixels, width_of_rectangle_in_pixels, height_of_rectangle_in_pixels);
138 | //if (debug_level >= 1) duration_filling_rects += performance.now() - time_started_filling_rect;
139 |
140 |
141 | }
142 | }
143 | }
144 | return tile;
145 |
146 | },
147 | interpolatedValueAtIndexes(i,j){
148 | const raster = this._rasters[0]
149 | let tiff_width = this._tiff_width
150 | let tiff_height = this._tiff_height;
151 | let fi,fj,ci,cj
152 | let g00, g10, g01, g11
153 | if(i >= tiff_width - 1){
154 | fi = ci = tiff_width - 1
155 | }else{
156 | fi = Math.floor(i)
157 | ci = fi + 1
158 | }
159 | if(j >= tiff_height - 1){
160 | fj = cj = tiff_height - 1
161 | }else{
162 | fj = Math.floor(j)
163 | cj = fj + 1
164 | }
165 | const row0 = raster[fj]
166 | g00 = row0[fi]
167 | g10 = row0[ci];
168 |
169 | const row1 = raster[cj]
170 |
171 | g01 = row1[fi]
172 | g11 = row1[ci];
173 | return this._doInterpolation(i-fi,j-fj,g00, g10, g01, g11)
174 | },
175 | /**
176 | * Bilinear interpolation for Number
177 | * https://en.wikipedia.org/wiki/Bilinear_interpolation
178 | * @param {Number} x
179 | * @param {Number} y
180 | * @param {Number} g00
181 | * @param {Number} g10
182 | * @param {Number} g01
183 | * @param {Number} g11
184 | * @returns {Number}
185 | */
186 | _doInterpolation(x, y, g00, g10, g01, g11) {
187 | var rx = 1 - x;
188 | var ry = 1 - y;
189 | return g00 * rx * ry + g10 * x * ry + g01 * rx * y + g11 * x * y;
190 | },
191 | getBounds: function getBounds() {
192 | return this._bounds;
193 | },
194 |
195 | getColor: function getColor(name) {
196 | var d = document.createElement("div");
197 | d.style.color = name;
198 | document.body.appendChild(d);
199 | return window.getComputedStyle(d).color;
200 | },
201 | onLayerDidMount:function() {
202 | this._map.on('click', this._onClick, this);
203 | },
204 | _onClick:function(e){
205 | this._queryvalue(e)
206 | this.fire('click', e);
207 | },
208 | _queryvalue(e){
209 | let xmin = this._xmin;
210 | let ymax = this._ymax;
211 | let pixelWidth = this._pixelWidth;
212 | let pixelHeight = this._pixelHeight;
213 | let lng = e.latlng.lng
214 | let lat = e.latlng.lat
215 | let rasters = this._rasters[0]
216 | let x_pixels = Math.floor((lng - xmin) / pixelWidth);
217 | let y_pixels = Math.floor((ymax - lat) / pixelHeight);
218 | const value = rasters[y_pixels][x_pixels]
219 | if(!value) return;
220 | L.popup().setLatLng(e.latlng)
221 | .setContent(value+'')
222 | .openOn(this._map);
223 | },
224 | onAdd:function(map){
225 | this._map = map
226 | L.GridLayer.prototype.onAdd.call(this, map);
227 | this.onLayerDidMount()
228 | }
229 | });
230 |
231 | if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
232 | module.exports = GeoRasterLayer;
233 | }
234 | if (typeof window !== "undefined") {
235 | window["GeoRasterLayer"] = GeoRasterLayer;
236 | } else if (typeof self !== "undefined") {
237 | self["GeoRasterLayer"] = GeoRasterLayer; // jshint ignore:line
238 | }
--------------------------------------------------------------------------------
/src/plugins/leaflet-echarts.js:
--------------------------------------------------------------------------------
1 | import L from 'leaflet';
2 | L.EchartsLayer = L.Class.extend({
3 | includes: [L.Evented],
4 | _echartsContainer: null,
5 | _map: null,
6 | _ec: null,
7 | _option: null,
8 | _mapOffset: [0, 0],
9 | _delta: 0,
10 | _startTime: null,
11 | _lastMousePos: null,
12 | _data: null,
13 | _once: 0,
14 | initialize: function (map, ec, oriData = []) {
15 | this._map = map;
16 | let size = map.getSize();
17 | const div = this._echartsContainer = document.createElement('div');
18 | div.style.position = 'absolute';
19 | div.style.height = size.y + 'px';
20 | div.style.width = size.x + 'px';
21 | div.style.top = 0;
22 | div.style.left = 0;
23 | div.style.zIndex = 555
24 | this.overlayPane = map.getPanes().overlayPane;
25 | this.overlayPane.appendChild(div);
26 | this._init(map, ec);
27 | this._data = oriData
28 | this._once = 0;
29 | },
30 |
31 | _init: function (map, ec) {
32 | let task;
33 | const self = this;
34 | self._map = map;
35 | //初始化mapoverlay
36 | /**
37 | * 获取echarts容器
38 | *
39 | * @return {HTMLElement}
40 | * @public
41 | */
42 | self.getEchartsContainer = function () {
43 | return self._echartsContainer;
44 | };
45 | self.update = function ({
46 | seriesIndex,
47 | data
48 | }) {
49 | this._data[seriesIndex] = data
50 | self._once = 1;
51 | self._ec && self._ec.clear();
52 | self.setOption(self._option)
53 | }
54 | self.reload = function () {
55 | self._once = 1;
56 | self._ec && self._ec.clear();
57 | console.log(self._option);
58 | self._ec.setOption(self._option);
59 | }
60 | /**
61 | * 获取map实例
62 | *
63 | * @return {map.Map}
64 | * @public
65 | */
66 | self.getMap = function () {
67 | return self._map;
68 | };
69 | /**
70 | * 经纬度转换为屏幕像素
71 | *
72 | * @param {Array.} geoCoord 经纬度
73 | * @return {Array.}
74 | * @public
75 | */
76 | self.geoCoord2Pixel = function (latLng) {
77 | //const point = new L.latLng(geoCoord[1], geoCoord[0]);
78 | const pos = self._map.latLngToContainerPoint(latLng);
79 | return [pos.x, pos.y];
80 | };
81 |
82 | /**
83 | * 屏幕像素转换为经纬度
84 | *
85 | * @param {Array.} pixel 像素坐标
86 | * @return {Array.}
87 | * @public
88 | */
89 | self.pixel2GeoCoord = function (pixel) {
90 | const point = self._map.containerPointToLatLng(L.point(pixel[0], pixel[1]));
91 | return [point.lng, point.lat];
92 | };
93 |
94 | /**
95 | * 初始化echarts实例
96 | *
97 | * @return {ECharts}
98 | * @public
99 | */
100 | self.initECharts = function () {
101 |
102 | self._ec = ec.init.apply(self, arguments);
103 |
104 | self._bindEvent();
105 | return self._ec;
106 | };
107 |
108 |
109 | /**
110 | * 获取ECharts实例
111 | *
112 | * @return {ECharts}
113 | * @public
114 | */
115 | self.getECharts = function () {
116 | return self._ec;
117 | };
118 |
119 | /**
120 | * 获取地图的偏移量
121 | *
122 | * @return {Array.}
123 | * @public
124 | */
125 | self.getMapOffset = function () {
126 | return self._mapOffset;
127 | };
128 |
129 | /**
130 | * 对echarts的setOption加一次处理
131 | * 用来为markPoint、markLine中添加x、y坐标,需要name与geoCoord对应
132 | *
133 | * @public
134 | * @param option
135 | * @param notMerge
136 | */
137 | self.setOption = function (option, notMerge) {
138 | self._option = option;
139 | let series = self._option.series;
140 | if (!Array.isArray(series)) series = [series];
141 | for (let i = 0; i < series.length; i++) {
142 | if (series[i].coordinateSystem !== 'geo') return;
143 | if (self._once === 0) self._data[i] = series[i].data;
144 | if (series[i].type === 'scatter') {
145 | self.scatterRender(series[i], i)
146 | }
147 | if (series[i].type === 'flowGL' || series[i].type === 'custom') {
148 | self.flowRender(series[i], i)
149 | }
150 | if (series[i].type === 'lines') {
151 | self.linesRender(series[i], i)
152 | }
153 | }
154 | self._ec.setOption(option, notMerge);
155 |
156 | };
157 | // 风场
158 | self.flowRender = function (serie, index = 0) {
159 | serie.data = self.flowData(self._data[index]);
160 | }
161 | self.flowData = function (data) {
162 | const ret = [];
163 | for (let i = 0; i < data.length; i++) {
164 | const layerXY = self.geoCoord2Pixel(L.latLng([data[i][1], data[i][0]]));
165 | ret.push([layerXY[0], layerXY[1]].concat(data[i].slice(2)))
166 | }
167 | return ret;
168 | }
169 | // 散点
170 | self.scatterRender = function (serie, index = 0) {
171 | serie.data = self.scatterData(self._data[index]);
172 | }
173 | self.scatterData = function (data) {
174 | const ret = [];
175 | for (let i = 0; i < data.length; i++) {
176 | const layerXY = self.geoCoord2Pixel(L.latLng([data[i].value[1], data[i].value[0]]));
177 | ret.push(Object.assign({},data[i],{
178 | value: [layerXY[0], layerXY[1]].concat(data[i].value.slice(2))
179 | }))
180 | }
181 | return ret;
182 | }
183 | // 线
184 | self.linesRender = function (serie, index = 0) {
185 | serie.data = self.linesData(self._data[index]);
186 | }
187 | self.linesData = function (data) {
188 | const ret = [],
189 | coords = [];
190 | for (let i = 0; i < data.length; i++) {
191 | for (let j = 0; j < data[i].coords.length; j++) {
192 | const layerXY = self.geoCoord2Pixel(L.latLng([data[i].coords[j][1], data[i].coords[j][0]]));
193 | coords.push([layerXY[0], layerXY[1]].concat(data[i].coords[j].slice(2)))
194 | }
195 | let obj = Object.assign({},data[i],{
196 | coords: coords
197 | })
198 | ret.push(obj)
199 |
200 | }
201 | return ret;
202 | }
203 |
204 | /**
205 | * 绑定地图事件的处理方法
206 | *
207 | * @private
208 | */
209 | self._bindEvent = function () {
210 | console.log('hello')
211 | self._map.on('move', _moveHandler('moving'));
212 | self._map.on('moveend', _moveHandler('moveend'));
213 | self._map.on('zoomstart', function () {
214 | self._ec.clear();
215 | }); //去掉zoomstart事件
216 | self._map.on('zoomend', _zoomChangeHandler);
217 | self._ec.getZr().on('mousewheel', function (e) {
218 | if (self._map.getZoom() == self._map.getMaxZoom()) {
219 | self._ec.clear(); //在mousewheel的时候清除echarts内容
220 | _zoomChangeHandler();
221 | } else if (self._map.getZoom() == self._map.getMinZoom()) {
222 | self._ec.clear(); //在mousewheel的时候清除echarts内容
223 | _zoomChangeHandler();
224 | } else {
225 | self._ec.clear(); //在mousewheel的时候清除echarts内容
226 | self._lastMousePos = self._map.mouseEventToContainerPoint(e.event);
227 | let delta = L.DomEvent.getWheelDelta(e.event);
228 | const map = self._map,
229 | zoom = map.getZoom();
230 | delta = delta > 0 ? Math.ceil(delta) : Math.floor(delta);
231 | delta = Math.max(Math.min(delta, 4), -4);
232 | delta = map._limitZoom(zoom + delta) - zoom;
233 |
234 | self._delta = 0;
235 | self._startTime = null;
236 |
237 | if (!delta) {
238 | return;
239 | }
240 |
241 | if (map.options.scrollWheelZoom === 'center') {
242 | map.setZoom(zoom + delta);
243 | } else {
244 | map.setZoomAround(self._lastMousePos, zoom + delta);
245 | }
246 | }
247 |
248 | });
249 | };
250 | // 追加数据
251 | self.appendData = function ({
252 | seriesIndex,
253 | data
254 | }) {
255 | self._data[seriesIndex] = self._data[seriesIndex].concat(data);
256 | let series = self._option.series,
257 | serieData = null;
258 | if (!Array.isArray(self._option.series)) series = [series];
259 | const type = series[seriesIndex].type;
260 | switch (type) {
261 | case 'scatter':
262 | serieData = self.scatterData(data);
263 | break;
264 | case 'lines':
265 | serieData = self.linesData(data);
266 | break;
267 | case 'custom':
268 | serieData = self.flowData(data);
269 | break;
270 | case 'flowGL':
271 | serieData = self.flowData(data);
272 | break;
273 | }
274 | self.getECharts().appendData({
275 | seriesIndex,
276 | data: serieData
277 | })
278 | }
279 | /**
280 | * 地图缩放触发事件
281 | *
282 | * @private
283 | */
284 | function _zoomChangeHandler() {
285 | let timer;
286 | if (self._option.series) {
287 | clearTimeout(timer);
288 | timer = setTimeout(() => {
289 | self._once = 1;
290 | self.setOption(self._option)
291 | }, 150);
292 | }
293 | }
294 |
295 | /**
296 | * 地图移动、如拖拽触发事件
297 | *
298 | * @param {string} type moving | moveend 移动中|移动结束
299 | * @return {Function}
300 | * @private
301 | */
302 | function _moveHandler(type) {
303 | return function () {
304 | const domPosition = self._map._getMapPanePos();
305 | // 记录偏移量
306 | self._mapOffset = [-parseInt(domPosition.x) || 0, -parseInt(domPosition.y) || 0];
307 | self._echartsContainer.style.left = self._mapOffset[0] + 'px';
308 | self._echartsContainer.style.top = self._mapOffset[1] + 'px';
309 | //_fireEvent(type);
310 | if (type == 'moving') {
311 | self._ec.clear();
312 | }
313 | if (type == 'moveend') {
314 | _zoomChangeHandler()
315 | }
316 | }
317 | }
318 | },
319 | destory: function(){
320 | this.overlayPane.removeChild(this._echartsContainer);
321 | }
322 | });
323 | L.echartsLayer = function (map, ec, data = []) {
324 | return new L.EchartsLayer(map, ec, data)
325 | }
--------------------------------------------------------------------------------
/src/plugins/leaflet.canvasLayer.js:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | Generic Canvas Layer for leaflet 0.7 and 1.0-rc,
4 | copyright Stanislav Sumbera, 2016 , sumbera.com , license MIT
5 | originally created and motivated by L.CanvasOverlay available here: https://gist.github.com/Sumbera/11114288
6 |
7 | */
8 |
9 | // -- L.DomUtil.setTransform from leaflet 1.0.0 to work on 0.0.7
10 | //------------------------------------------------------------------------------
11 | if(!L.DomUtil.setTransform){
12 |
13 | L.DomUtil.setTransform = function (el, offset, scale) {
14 | var pos = offset || new L.Point(0, 0);
15 |
16 | el.style[L.DomUtil.TRANSFORM] =
17 | (L.Browser.ie3d ?
18 | 'translate(' + pos.x + 'px,' + pos.y + 'px)' :
19 | 'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') +
20 | (scale ? ' scale(' + scale + ')' : '');
21 | };
22 | }
23 |
24 | // -- support for both 0.0.7 and 1.0.0 rc2 leaflet
25 | export var CanvasLayer = (L.Layer ? L.Layer : L.Class).extend({
26 | // -- initialized is called on prototype
27 | initialize: function (options) {
28 | this._map = null;
29 | this._canvas = null;
30 | this._frame = null;
31 | this._delegate = null;
32 | L.setOptions(this, options);
33 | },
34 |
35 | delegate :function(del){
36 | this._delegate = del;
37 | return this;
38 | },
39 |
40 | needRedraw: function () {
41 | if (!this._frame) {
42 | this._frame = L.Util.requestAnimFrame(this.drawLayer, this);
43 | }
44 | return this;
45 | },
46 |
47 | //-------------------------------------------------------------
48 | _onLayerDidResize: function (resizeEvent) {
49 | this._canvas.width = resizeEvent.newSize.x;
50 | this._canvas.height = resizeEvent.newSize.y;
51 | },
52 | //-------------------------------------------------------------
53 | _onLayerDidMove: function () {
54 | var topLeft = this._map.containerPointToLayerPoint([0, 0]);
55 | L.DomUtil.setPosition(this._canvas, topLeft);
56 | this.drawLayer();
57 | },
58 | //-------------------------------------------------------------
59 | getEvents: function () {
60 | var events = {
61 | resize: this._onLayerDidResize,
62 | moveend: this._onLayerDidMove
63 | };
64 | if (this._map.options.zoomAnimation && L.Browser.any3d) {
65 | events.zoomanim = this._animateZoom;
66 | }
67 |
68 | return events;
69 | },
70 | //-------------------------------------------------------------
71 | onAdd: function (map) {
72 | this._map = map;
73 | this._canvas = L.DomUtil.create('canvas', 'leaflet-layer');
74 | this.tiles = {};
75 |
76 | var size = this._map.getSize();
77 | this._canvas.width = size.x;
78 | this._canvas.height = size.y;
79 |
80 | var animated = this._map.options.zoomAnimation && L.Browser.any3d;
81 | L.DomUtil.addClass(this._canvas, 'leaflet-zoom-' + (animated ? 'animated' : 'hide'));
82 |
83 |
84 | map._panes.overlayPane.appendChild(this._canvas);
85 | map.on(this.getEvents(),this);
86 |
87 | var del = this._delegate || this;
88 | del.onLayerDidMount && del.onLayerDidMount(); // -- callback
89 | this.needRedraw();
90 |
91 | var self = this;
92 | setTimeout(function(){
93 | self._onLayerDidMove();
94 | }, 0);
95 | },
96 |
97 | //-------------------------------------------------------------
98 | onRemove: function (map) {
99 | var del = this._delegate || this;
100 | del.onLayerWillUnmount && del.onLayerWillUnmount(); // -- callback
101 |
102 |
103 | map.getPanes().overlayPane.removeChild(this._canvas);
104 |
105 | map.off(this.getEvents(),this);
106 |
107 | this._canvas = null;
108 |
109 | },
110 |
111 | //------------------------------------------------------------
112 | addTo: function (map) {
113 | map.addLayer(this);
114 | return this;
115 | },
116 | // --------------------------------------------------------------------------------
117 | LatLonToMercator: function (latlon) {
118 | return {
119 | x: latlon.lng * 6378137 * Math.PI / 180,
120 | y: Math.log(Math.tan((90 + latlon.lat) * Math.PI / 360)) * 6378137
121 | };
122 | },
123 |
124 | //------------------------------------------------------------------------------
125 | drawLayer: function () {
126 | // -- todo make the viewInfo properties flat objects.
127 | var size = this._map.getSize();
128 | var bounds = this._map.getBounds();
129 | var zoom = this._map.getZoom();
130 |
131 | var center = this.LatLonToMercator(this._map.getCenter());
132 | var corner = this.LatLonToMercator(this._map.containerPointToLatLng(this._map.getSize()));
133 |
134 | var del = this._delegate || this;
135 | del.onDrawLayer && del.onDrawLayer( {
136 | layer : this,
137 | canvas: this._canvas,
138 | bounds: bounds,
139 | size: size,
140 | zoom: zoom,
141 | center : center,
142 | corner : corner
143 | });
144 | this._frame = null;
145 | },
146 | // -- L.DomUtil.setTransform from leaflet 1.0.0 to work on 0.0.7
147 | //------------------------------------------------------------------------------
148 | _setTransform: function (el, offset, scale) {
149 | var pos = offset || new L.Point(0, 0);
150 |
151 | el.style[L.DomUtil.TRANSFORM] =
152 | (L.Browser.ie3d ?
153 | 'translate(' + pos.x + 'px,' + pos.y + 'px)' :
154 | 'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') +
155 | (scale ? ' scale(' + scale + ')' : '');
156 | },
157 |
158 | //------------------------------------------------------------------------------
159 | _animateZoom: function (e) {
160 | var scale = this._map.getZoomScale(e.zoom);
161 | // -- different calc of offset in leaflet 1.0.0 and 0.0.7 thanks for 1.0.0-rc2 calc @jduggan1
162 | var offset = L.Layer ? this._map._latLngToNewLayerPoint(this._map.getBounds().getNorthWest(), e.zoom, e.center) :
163 | this._map._getCenterOffset(e.center)._multiplyBy(-scale).subtract(this._map._getMapPanePos());
164 |
165 | L.DomUtil.setTransform(this._canvas, offset, scale);
166 |
167 |
168 | }
169 | });
170 |
171 | L.canvasLayer = function () {
172 | return new L.CanvasLayer();
173 | };
174 |
--------------------------------------------------------------------------------
/src/plugins/ocean.weather.wind.js:
--------------------------------------------------------------------------------
1 | import { CanvasLayer } from './leaflet.canvasLayer'
2 |
3 | /**
4 | * 气象图层 - 风
5 | */
6 | class Wind {
7 | /**
8 | * 构造函数
9 | * @param {L.LatLng} latlng 经纬度
10 | * @param {Number} speed 风速(海里/小时)
11 | * @param {Number} dir 风向(度,正北方向为0度,顺时针)
12 | * @param {Object} options 绘制选项
13 | * @return {Null} [description]
14 | */
15 | constructor(latlng, speed, dir, options = {}) {
16 | this._latlng = latlng;
17 | this._speed = this._convertToMileS(speed);
18 | this._dir = dir;
19 | this.options = Object.assign({
20 | isDrawLeftRight: false, // 是否绘制相邻两边
21 | windLineLen: 16, // 风向线长度
22 | levelLineMinLen: 4, // 风力线长度
23 | chunkCount: 6 //等分点个数,至少六等分
24 | }, options);
25 | }
26 |
27 | get latLng() {
28 | return this._latlng;
29 | }
30 |
31 | set latLng(value) {
32 | this._latlng = value;
33 | }
34 |
35 | get speed() {
36 | return this._speed;
37 | }
38 |
39 | set speed(value) {
40 | this._speed = this._convertToMileS(value);
41 | }
42 |
43 | get dir() {
44 | return this._dir;
45 | }
46 |
47 | set dir(value) {
48 | this._dir = value;
49 | }
50 |
51 | get level() {
52 | // return 10;
53 | var level = 0;
54 | var speed = this._speed;
55 | if(speed <= 0.2) {
56 | level = 0;
57 | } else if(speed > 0.2 && speed <= 1.5) {
58 | level = 1;
59 | } else if(speed > 1.5 && speed <= 3.3) {
60 | level = 2;
61 | } else if(speed > 3.3 && speed <= 5.4) {
62 | level = 3;
63 | } else if(speed > 5.4 && speed <= 7.9) {
64 | level = 4;
65 | } else if(speed > 7.9 && speed <= 10.7) {
66 | level = 5;
67 | } else if(speed > 10.7 && speed <= 13.8) {
68 | level = 6;
69 | } else if(speed > 13.8 && speed <= 17.1) {
70 | level = 7;
71 | } else if(speed > 17.1 && speed <= 20.7) {
72 | level = 8;
73 | } else if(speed > 20.7 && speed <= 24.4) {
74 | level = 9;
75 | } else if(speed > 24.4 && speed <= 28.4) {
76 | level = 10;
77 | } else if(speed > 28.4 && speed <= 32.6) {
78 | level = 11;
79 | } else if(speed > 32.6 && speed <= 36.9) {
80 | level = 12;
81 | } else if(speed > 36.9 && speed <= 41.4) {
82 | level = 13;
83 | } else if(speed > 41.4 && speed <= 46.1) {
84 | level = 14;
85 | } else if(speed > 46.1 && speed <= 50.9) {
86 | level = 15;
87 | } else if(speed > 50.9 && speed <= 56.0) {
88 | level = 16;
89 | } else if(speed > 56.0) {
90 | level = 17;
91 | }
92 | return level;
93 | }
94 |
95 | get color() {
96 | var speed = this._speed;
97 | if(speed <= 7.9) {
98 | // 0-4级风
99 | return '#D3DE44';
100 | } else if(speed > 7.9 && speed <= 17.1) {
101 | // 5-7级风
102 | return '#E68514';
103 | } else if(speed > 17.1 && speed <= 36.9) {
104 | // 8-12级风
105 | return '#E82318';
106 | } else {
107 | // 13-17级风
108 | return '#B80D75';
109 | }
110 | }
111 |
112 | _convertToMileS(speed) {
113 | return Number(speed) * 1852 / 3600;
114 | }
115 | }
116 |
117 | export var WindLayer = CanvasLayer.extend({
118 |
119 | initialize: function (options, config) {
120 | CanvasLayer.prototype.initialize.call(this, options);
121 | this.cfg = Object.assign({
122 | lat: '0',
123 | lng: '1',
124 | value: '2',
125 | dir: '3',
126 | data: [],
127 | isDrawLeftRight: false
128 | }, config);
129 | this._data = this.cfg.data;
130 | this._sortData = this.sortByLat(this._data);
131 | },
132 |
133 | setData: function (data) {
134 | // -- custom data set
135 | this._data = data;
136 | this._sortData = this.sortByLat(this._data);
137 | this.needRedraw(); // -- call to drawLayer
138 | },
139 |
140 | onLayerDidMount: function () {
141 | // -- prepare custom drawing
142 | },
143 |
144 | onLayerWillUnmount: function () {
145 | // -- custom cleanup
146 | },
147 |
148 | onDrawLayer: function (info) {
149 | // -- custom draw
150 | var canvas = this._canvas = info.canvas;
151 | var ctx = this._ctx = info.canvas.getContext('2d');
152 | var map = this._map = info.layer._map;
153 | var zoom = map.getZoom();
154 | var sortData = this._sortData;
155 | var latOffset = 1;
156 | var lngOffset = 1;
157 |
158 | ctx.clearRect(0, 0, canvas.width, canvas.height);
159 |
160 | // 根据不同级别确定抽稀粒度
161 | if(zoom < 2) {
162 | latOffset = 16;
163 | lngOffset = 16;
164 | } else if(zoom >= 2 && zoom < 3) {
165 | latOffset = 8;
166 | lngOffset = 8;
167 | } else if(zoom >= 3 && zoom < 5) {
168 | latOffset = 4;
169 | lngOffset = 4;
170 | } else {
171 | latOffset = 1;
172 | lngOffset = 1;
173 | }
174 |
175 | // 按纬度绘制
176 | var latPts, latlng, lLatLng, rLatLng, speed, dir, windobj, lwindobj, rwindobj;
177 | for(let i = 0, len = sortData.length; i < len; i += latOffset) {
178 | latPts = sortData[i];
179 | for(let j = 0, lenj = latPts.length; j < lenj; j += lngOffset) {
180 | latlng = L.latLng(latPts[j][this.cfg.lat], latPts[j][this.cfg.lng]);
181 | speed = Number(latPts[j][this.cfg.value]);
182 | dir = Number(latPts[j][this.cfg.dir]);
183 | windobj = new Wind(latlng, speed, dir, { isDrawLeftRight: this.cfg.isDrawLeftRight });
184 | this.drawWind(ctx, windobj);
185 | if(windobj.options.isDrawLeftRight) {
186 | lLatLng = latlng.getSubtract360LatLng();
187 | rLatLng = latlng.getAdd360LatLng();
188 | lwindobj = new Wind(lLatLng, speed, dir, { isDrawLeftRight: this.cfg.isDrawLeftRight });
189 | rwindobj = new Wind(rLatLng, speed, dir, { isDrawLeftRight: this.cfg.isDrawLeftRight });
190 | this.drawWind(ctx, lwindobj);
191 | this.drawWind(ctx, rwindobj);
192 | }
193 | }
194 | }
195 | },
196 |
197 | sortByLat: function (data) {
198 | // console.time('按纬度分隔');
199 | var newData = [];
200 | var temp = [];
201 | // 将数据按纬度划分
202 | for(let i = 0, len = data.length; i < len; i++) {
203 | if(temp.length === 0) {
204 | temp.push(data[i]);
205 | } else {
206 | if(data[i][0] === temp[temp.length - 1][0]) {
207 | temp.push(data[i]);
208 | } else {
209 | newData.push(temp);
210 | temp = [];
211 | }
212 | }
213 | }
214 | // console.timeEnd('按纬度分隔');
215 | return newData;
216 | },
217 |
218 | drawWind: function (ctx, WindObj) {
219 | // console.time('drawWind');
220 | var startPoint = this._map.latLngToContainerPoint(WindObj.latLng);
221 | var len = WindObj.options.windLineLen;
222 | var r = WindObj.options.levelLineMinLen;
223 | var arc = Math.PI / 180 * WindObj.dir;
224 | var a = startPoint.x;
225 | var b = startPoint.y;
226 | var x0 = a;
227 | var y0 = b - len;
228 | var endPoint = {
229 | x: a + (x0 - a) * Math.cos(arc) - (y0 - b) * Math.sin(arc),
230 | y: b + (x0 - a) * Math.sin(arc) + (y0 - b) * Math.cos(arc)
231 | };
232 | var level = WindObj.level;
233 | var floorLevel = Math.floor(level / 8);
234 | var color = WindObj.color;
235 |
236 | var count8 = floorLevel; // 8级个数
237 | var count2 = Math.floor(level % 8 / 2); // 2级个数
238 | var count1 = level % 2 === 0 ? 0 : 1; // 1级个数
239 | var count = WindObj.options.chunkCount; // 等分点个数
240 |
241 | ctx.save();
242 | ctx.beginPath();
243 | if(count8 === 0 && count2 === 0 && count1 === 0) {
244 | ctx.arc(startPoint.x, startPoint.y, r, 0, Math.PI * 2);
245 | } else {
246 | ctx.moveTo(startPoint.x, startPoint.y);
247 | ctx.lineTo(endPoint.x, endPoint.y);
248 | // 8 级
249 | for(let i = 0; i < count8; i++) {
250 | let sp = this.getChunkPoint(startPoint, endPoint, count, 2 * i + 1);
251 | let sp2 = this.getChunkPoint(startPoint, endPoint, count, 2 * i + 1 + 2);
252 | let lp = this.getPointByDistance(startPoint, sp, r * 2);
253 | ctx.moveTo(sp.x, sp.y);
254 | ctx.lineTo(lp.x, lp.y);
255 | ctx.lineTo(sp2.x, sp2.y);
256 | }
257 | // 2级
258 | for(let i = 0; i < count2; i++) {
259 | let sp = this.getChunkPoint(startPoint, endPoint, count, 2 * count8 + 1 + i);
260 | let lp = this.getPointByDistance(startPoint, sp, r * 2);
261 | ctx.moveTo(sp.x, sp.y);
262 | ctx.lineTo(lp.x, lp.y);
263 | }
264 | // 1级
265 | for(let i = 0; i < count1; i++) {
266 | let sp = this.getChunkPoint(startPoint, endPoint, count, 2 * count8 + 1 + count2 + i);
267 | let lp = this.getPointByDistance(startPoint, sp, r);
268 | ctx.moveTo(sp.x, sp.y);
269 | ctx.lineTo(lp.x, lp.y);
270 | }
271 | }
272 | ctx.strokeStyle = color;
273 | ctx.stroke();
274 | ctx.restore();
275 | // console.timeEnd('drawWind');
276 | },
277 |
278 | //取一条线的 count 等分点的第number(1,2,3...)个点,从endPoint开始计数。
279 | getChunkPoint: function (startPoint, endPoint, count, number) {
280 | var points = [];
281 | var xn, yn;
282 | points.push(startPoint);
283 | for(let i = 1; i < count; i++) {
284 | xn = startPoint.x + i * (endPoint.x - startPoint.x) / count;
285 | yn = startPoint.y + i * (endPoint.y - startPoint.y) / count;
286 | points.push(L.point(xn, yn));
287 | }
288 | points.push(endPoint);
289 | points = points.reverse();
290 | return points[number - 1];
291 | },
292 |
293 | getPointByDistance: function (sp, ep, r) {
294 | var x, y;
295 | var k = (ep.y - sp.y) / (ep.x - sp.x);
296 | var r2 = Math.pow(r, 2);
297 | var k2 = Math.pow(k, 2);
298 | //不同坐标系符号问题
299 | if(ep.x > sp.x) {
300 | if(ep.y < sp.y) {
301 | x = ep.x + Math.sqrt((r2 * k2) / (1 + k2));
302 | y = ep.y + Math.sqrt(r2 / (1 + k2));
303 | } else {
304 | x = ep.x - Math.sqrt((r2 * k2) / (1 + k2));
305 | y = ep.y + Math.sqrt(r2 / (1 + k2));
306 | }
307 |
308 | } else if(ep.x < sp.x) {
309 | if(ep.y > sp.y) {
310 | x = ep.x - Math.sqrt((r2 * k2) / (1 + k2));
311 | y = ep.y - Math.sqrt(r2 / (1 + k2));
312 | } else {
313 | x = ep.x + Math.sqrt((r2 * k2) / (1 + k2));
314 | y = ep.y - Math.sqrt(r2 / (1 + k2));
315 | }
316 | } else {
317 | if(ep.y > sp.y) {
318 | x = ep.x - r;
319 | y = ep.y;
320 | } else {
321 | x = ep.x + r;
322 | y = ep.y;
323 | }
324 | }
325 | return L.point(x, y);
326 | }
327 |
328 | });
329 |
--------------------------------------------------------------------------------
/src/router.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Router from 'vue-router'
3 |
4 | Vue.use(Router)
5 |
6 | export default new Router({
7 | routes: [
8 | {
9 | path: '/',
10 | name: 'home',
11 | redirect: {
12 | name:'geotiff'
13 | },
14 | },
15 | {
16 | path: '/geotiff',
17 | name: 'geotiff',
18 | component: () => import(/* webpackChunkName: "geotiff" */ './views/TiffMapLayer.vue')
19 | },
20 | {
21 | path: '/ec',
22 | name: 'leafletEcharts',
23 | component: () => import(/* webpackChunkName: "leafletEcharts" */ './views/EchartsMapLayer.vue')
24 | },
25 | {
26 | path: '/flow',
27 | name: 'flow',
28 | component: () => import(/* webpackChunkName: "flow" */ './views/FlowMapLayer.vue')
29 | },
30 | {
31 | path: '/points',
32 | name: 'points',
33 | component: () => import(/* webpackChunkName: "points" */ './views/PointsMapLayer.vue')
34 | },
35 | ]
36 | })
37 |
--------------------------------------------------------------------------------
/src/views/EchartsMapLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
105 |
--------------------------------------------------------------------------------
/src/views/FlowMapLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
82 |
--------------------------------------------------------------------------------
/src/views/PointsMapLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
108 |
--------------------------------------------------------------------------------
/src/views/TiffMapLayer.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
119 |
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | module.exports={
2 | publicPath: './',
3 | // https://zjfcool.github.io
4 | // devServer: {
5 | // host: '0.0.0.0',
6 | // proxy: {
7 | // "/leaflet-learn": {
8 | // target: "https://zjfcool.github.io",
9 | // changeOrigin: true,
10 | // autoRewrite: true,
11 | // cookieDomainRewrite: true,
12 | // // pathRewrite: {
13 | // // '^/api': '/'
14 | // // }
15 |
16 | // },
17 |
18 | // }
19 | // }
20 | }
--------------------------------------------------------------------------------