├── lib
├── images
│ ├── layers.png
│ ├── layers-2x.png
│ ├── marker-icon.png
│ ├── marker-shadow.png
│ └── marker-icon-2x.png
├── marker-shadow.png
├── proj4leaflet@1.0.1.min.js
├── leaflet.ChineseTmsProviders@1.0.4.js
├── leaflet@1.7.1.css
└── proj4@2.4.3.js
├── update.sh
├── package.json
├── .github
└── workflows
│ └── npm-publish.yml
├── README.md
├── LICENSE
└── index.js
/lib/images/layers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kuole-o/hexo-tag-map/HEAD/lib/images/layers.png
--------------------------------------------------------------------------------
/lib/marker-shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kuole-o/hexo-tag-map/HEAD/lib/marker-shadow.png
--------------------------------------------------------------------------------
/lib/images/layers-2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kuole-o/hexo-tag-map/HEAD/lib/images/layers-2x.png
--------------------------------------------------------------------------------
/lib/images/marker-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kuole-o/hexo-tag-map/HEAD/lib/images/marker-icon.png
--------------------------------------------------------------------------------
/lib/images/marker-shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kuole-o/hexo-tag-map/HEAD/lib/images/marker-shadow.png
--------------------------------------------------------------------------------
/lib/images/marker-icon-2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kuole-o/hexo-tag-map/HEAD/lib/images/marker-icon-2x.png
--------------------------------------------------------------------------------
/update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | echo -e "\033[0;32mUpdates to GitHub...\033[0m"
3 |
4 | git add .
5 | msg="🎉 包更新于 `date`"
6 | if [ $# -eq 1 ]
7 | then msg="$1"
8 | fi
9 | git commit -m "$msg"
10 |
11 | # Push source and build repos.
12 | git push github main
13 |
14 | # push执行完成,不自动退出
15 | exec /bin/bash
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hexo-tag-map",
3 | "version": "1.2.1",
4 | "description": "A map plug-in under hexo, which supports rendering of beautiful interactive maps on article pages.",
5 | "main": "index.js",
6 | "directories": {
7 | "lib": "lib"
8 | },
9 | "scripts": {
10 | "test": "echo \"Error: no test specified\" && exit 1"
11 | },
12 | "repository": {
13 | "type": "git",
14 | "url": "git+ssh://git@github.com/kuole-o/hexo-tag-map.git"
15 | },
16 | "author": "guole",
17 | "license": "Apache-2.0",
18 | "bugs": {
19 | "url": "https://github.com/kuole-o/hexo-tag-map/issues"
20 | },
21 | "homepage": "https://github.com/kuole-o/hexo-tag-map#readme",
22 | "dependencies": {}
23 | }
24 |
--------------------------------------------------------------------------------
/.github/workflows/npm-publish.yml:
--------------------------------------------------------------------------------
1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3 |
4 | name: publish hexo-tag-map
5 |
6 | on:
7 | push:
8 | branches: [main]
9 |
10 | jobs:
11 | publish-npm:
12 | runs-on: ubuntu-latest
13 | steps:
14 | - uses: actions/checkout@v2
15 | - uses: actions/setup-node@v2
16 | with:
17 | node-version: 14
18 | registry-url: https://registry.npmjs.org/
19 | - run: npm ci
20 | - run: npm publish
21 | env:
22 | NODE_AUTH_TOKEN: ${{secrets.npm_token}}
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Hexo-tag-map
3 | 给你的 Hexo 文章插入交互式地图吧!支持GoogleMap、高德地图、百度地图、Geoq地图、openstreetMap常规地图+卫星地图+卫星标注地图!一个强大的地图插件。
4 | Insert an interactive map into your Hexo article! Support GoogleMap, Gaode map, Baidu map, Geoq map, openstreetMap regular map + satellite map + satellite annotated map! A powerful map plugin.
5 | * author: guole
6 | * https://blog.guole.fun/
7 | * license: Apache-2.0
8 | * https://github.com/kuole-o/hexo-tag-map/blob/main/LICENSE
9 | * Tutorials:https://blog.guole.fun/posts/41887/
10 |
11 | ## 特性
12 |
13 | * 包含
14 | * [混合地图]你将获得一个混合切换GoogleMap、高德地图、Geoq地图,常规地图+卫星地图+卫星标注地图共7个图层的地图
15 | * [GoogleMap]你还将获得一个单独的谷歌地图+谷歌卫星地图
16 | * [高德地图]你还将获得一个单独的高德地图+高德卫星地图+高德卫星标注地图
17 | * [百度地图]你还将获得一个单独的百度地图+百度卫星地图+百度卫星标注地图
18 | * [Geoq地图]你还将获得一个单独的Geoq地图+5种显示风格
19 | * [openstreetMap]你还将获得一个单独的openstreetMap常规地图
20 | * 支持标记点提示文本
21 | * **支持各个地图缩放等级配置+经纬度配置+地图容器宽高配置+默认展示地图类型配置**
22 | * 用法超级简单
23 | * Butterfly已验证,其他Hexo主题,欢迎体验
24 |
25 |
26 | 更新日志 v1.2.1
27 | * 优化地图容器样式,增加间距 `margin: 0.8rem 0 1.6rem 0;`
28 | * 更换依赖包为 `unpkg.com`
29 |
30 |
31 | ## [Demo页面](https://blog.guole.fun/map/)
32 |
33 | [详细用法,请点击这里查看](https://blog.guole.fun/posts/41887/)
34 |
35 |
36 | 点击展开截图
37 |
38 | * 混合地图
39 | 
40 | 
41 | 
42 | 
43 | 
44 | 
45 | 
46 |
47 | * 谷歌地图
48 | 
49 | 
50 | 
51 |
52 | * 高德地图
53 | 
54 | 
55 | 
56 |
57 | * 百度地图
58 | 
59 | 
60 | 
61 |
62 | * Geoq地图
63 | 
64 | 
65 | 
66 | 
67 | 
68 |
69 | * openstreetMap
70 | 
71 |
72 |
73 | ## 安装
74 |
75 | ```shell
76 | npm install hexo-tag-map --save
77 | ```
78 |
79 | ## 用法
80 |
81 |
82 | 点击展开详情
83 |
84 | 插入一个混合地图的示例:
85 | {% map %}
86 |
87 | 插入一个高德地图的示例:
88 | {% gaodeMap %}
89 |
90 | 插入一个openstreetMap的示例:
91 | {% openstreetMap %}
92 |
93 | 插入一个百度地图的示例:
94 | {% baiduMap %}
95 |
96 | 插入一个geoqMap的示例:
97 | {% geoqMap %}
98 |
99 | 插入一个googleMap的示例:
100 | {% googleMap %}
101 |
102 | [详细用法,请点击这里查看](https://blog.guole.fun/posts/41887/)
103 |
104 |
105 | ## 许可
106 | [Apache License 2.0](https://github.com/kuole-o/hexo-tag-map/blob/main/LICENSE)
107 |
--------------------------------------------------------------------------------
/lib/proj4leaflet@1.0.1.min.js:
--------------------------------------------------------------------------------
1 | !function(t){var o,e;if("function"==typeof define&&define.amd)define(["leaflet","proj4"],t);else if("object"==typeof module&&"object"==typeof module.exports)o=require("leaflet"),e=require("proj4"),module.exports=t(o,e);else{if("undefined"==typeof window.L||"undefined"==typeof window.proj4)throw"Leaflet and proj4 must be loaded first";t(window.L,window.proj4)}}(function(t,o){return t.Proj={},t.Proj._isProj4Obj=function(t){return"undefined"!=typeof t.inverse&&"undefined"!=typeof t.forward},t.Proj.Projection=t.Class.extend({initialize:function(o,e,i){var n=t.Proj._isProj4Obj(o);this._proj=n?o:this._projFromCodeDef(o,e),this.bounds=n?e:i},project:function(o){var e=this._proj.forward([o.lng,o.lat]);return new t.Point(e[0],e[1])},unproject:function(o,e){var i=this._proj.inverse([o.x,o.y]);return new t.LatLng(i[1],i[0],e)},_projFromCodeDef:function(t,e){if(e)o.defs(t,e);else if(void 0===o.defs[t]){var i=t.split(":");if(i.length>3&&(t=i[i.length-3]+":"+i[i.length-1]),void 0===o.defs[t])throw"No projection definition for code "+t}return o(t)}}),t.Proj.CRS=t.Class.extend({includes:t.CRS,options:{transformation:new t.Transformation(1,0,-1,0)},initialize:function(o,e,i){var n,s,r,a;if(t.Proj._isProj4Obj(o)?(s=o,n=s.srsCode,a=e||{},this.projection=new t.Proj.Projection(s,a.bounds)):(n=o,r=e,a=i||{},this.projection=new t.Proj.Projection(n,r,a.bounds)),t.Util.setOptions(this,a),this.code=n,this.transformation=this.options.transformation,this.options.origin&&(this.transformation=new t.Transformation(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales)this._scales=this.options.scales;else if(this.options.resolutions){this._scales=[];for(var l=this.options.resolutions.length-1;l>=0;l--)this.options.resolutions[l]&&(this._scales[l]=1/this.options.resolutions[l])}this.infinite=!this.options.bounds},scale:function(t){var o,e,i,n,s=Math.floor(t);return t===s?this._scales[t]:(o=this._scales[s],e=this._scales[s+1],i=e-o,n=t-s,o+i*n)},zoom:function(t){var o,e,i,n=this._closestElement(this._scales,t),s=this._scales.indexOf(n);return t===n?s:(e=s+1,o=this._scales[e],void 0===o?1/0:(i=o-n,(t-n)/i+s))},distance:t.CRS.Earth.distance,R:t.CRS.Earth.R,_closestElement:function(t,o){for(var e,i=t.length;i--;)t[i]<=o&&(void 0===e||e svg,
9 | .leaflet-pane > canvas,
10 | .leaflet-zoom-box,
11 | .leaflet-image-layer,
12 | .leaflet-layer {
13 | position: absolute;
14 | left: 0;
15 | top: 0;
16 | }
17 | .leaflet-container {
18 | overflow: hidden;
19 | }
20 | .leaflet-tile,
21 | .leaflet-marker-icon,
22 | .leaflet-marker-shadow {
23 | -webkit-user-select: none;
24 | -moz-user-select: none;
25 | user-select: none;
26 | -webkit-user-drag: none;
27 | }
28 | /* Prevents IE11 from highlighting tiles in blue */
29 | .leaflet-tile::selection {
30 | background: transparent;
31 | }
32 | /* Safari renders non-retina tile on retina better with this, but Chrome is worse */
33 | .leaflet-safari .leaflet-tile {
34 | image-rendering: -webkit-optimize-contrast;
35 | }
36 | /* hack that prevents hw layers "stretching" when loading new tiles */
37 | .leaflet-safari .leaflet-tile-container {
38 | width: 1600px;
39 | height: 1600px;
40 | -webkit-transform-origin: 0 0;
41 | }
42 | .leaflet-marker-icon,
43 | .leaflet-marker-shadow {
44 | display: block;
45 | }
46 | /* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
47 | /* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
48 | .leaflet-container .leaflet-overlay-pane svg,
49 | .leaflet-container .leaflet-marker-pane img,
50 | .leaflet-container .leaflet-shadow-pane img,
51 | .leaflet-container .leaflet-tile-pane img,
52 | .leaflet-container img.leaflet-image-layer,
53 | .leaflet-container .leaflet-tile {
54 | max-width: none !important;
55 | max-height: none !important;
56 | }
57 |
58 | .leaflet-container.leaflet-touch-zoom {
59 | -ms-touch-action: pan-x pan-y;
60 | touch-action: pan-x pan-y;
61 | }
62 | .leaflet-container.leaflet-touch-drag {
63 | -ms-touch-action: pinch-zoom;
64 | /* Fallback for FF which doesn't support pinch-zoom */
65 | touch-action: none;
66 | touch-action: pinch-zoom;
67 | }
68 | .leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
69 | -ms-touch-action: none;
70 | touch-action: none;
71 | }
72 | .leaflet-container {
73 | -webkit-tap-highlight-color: transparent;
74 | }
75 | .leaflet-container a {
76 | -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
77 | }
78 | .leaflet-tile {
79 | filter: inherit;
80 | visibility: hidden;
81 | }
82 | .leaflet-tile-loaded {
83 | visibility: inherit;
84 | }
85 | .leaflet-zoom-box {
86 | width: 0;
87 | height: 0;
88 | -moz-box-sizing: border-box;
89 | box-sizing: border-box;
90 | z-index: 800;
91 | }
92 | /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
93 | .leaflet-overlay-pane svg {
94 | -moz-user-select: none;
95 | }
96 |
97 | .leaflet-pane { z-index: 400; }
98 |
99 | .leaflet-tile-pane { z-index: 200; }
100 | .leaflet-overlay-pane { z-index: 400; }
101 | .leaflet-shadow-pane { z-index: 500; }
102 | .leaflet-marker-pane { z-index: 600; }
103 | .leaflet-tooltip-pane { z-index: 650; }
104 | .leaflet-popup-pane { z-index: 700; }
105 |
106 | .leaflet-map-pane canvas { z-index: 100; }
107 | .leaflet-map-pane svg { z-index: 200; }
108 |
109 | .leaflet-vml-shape {
110 | width: 1px;
111 | height: 1px;
112 | }
113 | .lvml {
114 | behavior: url(#default#VML);
115 | display: inline-block;
116 | position: absolute;
117 | }
118 |
119 |
120 | /* control positioning */
121 |
122 | .leaflet-control {
123 | position: relative;
124 | z-index: 800;
125 | pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
126 | pointer-events: auto;
127 | }
128 | .leaflet-top,
129 | .leaflet-bottom {
130 | position: absolute;
131 | z-index: 1000;
132 | pointer-events: none;
133 | }
134 | .leaflet-top {
135 | top: 0;
136 | }
137 | .leaflet-right {
138 | right: 0;
139 | }
140 | .leaflet-bottom {
141 | bottom: 0;
142 | }
143 | .leaflet-left {
144 | left: 0;
145 | }
146 | .leaflet-control {
147 | float: left;
148 | clear: both;
149 | }
150 | .leaflet-right .leaflet-control {
151 | float: right;
152 | }
153 | .leaflet-top .leaflet-control {
154 | margin-top: 10px;
155 | }
156 | .leaflet-bottom .leaflet-control {
157 | margin-bottom: 10px;
158 | }
159 | .leaflet-left .leaflet-control {
160 | margin-left: 10px;
161 | }
162 | .leaflet-right .leaflet-control {
163 | margin-right: 10px;
164 | }
165 |
166 |
167 | /* zoom and fade animations */
168 |
169 | .leaflet-fade-anim .leaflet-tile {
170 | will-change: opacity;
171 | }
172 | .leaflet-fade-anim .leaflet-popup {
173 | opacity: 0;
174 | -webkit-transition: opacity 0.2s linear;
175 | -moz-transition: opacity 0.2s linear;
176 | transition: opacity 0.2s linear;
177 | }
178 | .leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
179 | opacity: 1;
180 | }
181 | .leaflet-zoom-animated {
182 | -webkit-transform-origin: 0 0;
183 | -ms-transform-origin: 0 0;
184 | transform-origin: 0 0;
185 | }
186 | .leaflet-zoom-anim .leaflet-zoom-animated {
187 | will-change: transform;
188 | }
189 | .leaflet-zoom-anim .leaflet-zoom-animated {
190 | -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
191 | -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
192 | transition: transform 0.25s cubic-bezier(0,0,0.25,1);
193 | }
194 | .leaflet-zoom-anim .leaflet-tile,
195 | .leaflet-pan-anim .leaflet-tile {
196 | -webkit-transition: none;
197 | -moz-transition: none;
198 | transition: none;
199 | }
200 |
201 | .leaflet-zoom-anim .leaflet-zoom-hide {
202 | visibility: hidden;
203 | }
204 |
205 |
206 | /* cursors */
207 |
208 | .leaflet-interactive {
209 | cursor: pointer;
210 | }
211 | .leaflet-grab {
212 | cursor: -webkit-grab;
213 | cursor: -moz-grab;
214 | cursor: grab;
215 | }
216 | .leaflet-crosshair,
217 | .leaflet-crosshair .leaflet-interactive {
218 | cursor: crosshair;
219 | }
220 | .leaflet-popup-pane,
221 | .leaflet-control {
222 | cursor: auto;
223 | }
224 | .leaflet-dragging .leaflet-grab,
225 | .leaflet-dragging .leaflet-grab .leaflet-interactive,
226 | .leaflet-dragging .leaflet-marker-draggable {
227 | cursor: move;
228 | cursor: -webkit-grabbing;
229 | cursor: -moz-grabbing;
230 | cursor: grabbing;
231 | }
232 |
233 | /* marker & overlays interactivity */
234 | .leaflet-marker-icon,
235 | .leaflet-marker-shadow,
236 | .leaflet-image-layer,
237 | .leaflet-pane > svg path,
238 | .leaflet-tile-container {
239 | pointer-events: none;
240 | }
241 |
242 | .leaflet-marker-icon.leaflet-interactive,
243 | .leaflet-image-layer.leaflet-interactive,
244 | .leaflet-pane > svg path.leaflet-interactive,
245 | svg.leaflet-image-layer.leaflet-interactive path {
246 | pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
247 | pointer-events: auto;
248 | }
249 |
250 | /* visual tweaks */
251 |
252 | .leaflet-container {
253 | background: #ddd;
254 | outline: 0;
255 | }
256 | .leaflet-container a {
257 | color: #0078A8;
258 | }
259 | .leaflet-container a.leaflet-active {
260 | outline: 2px solid orange;
261 | }
262 | .leaflet-zoom-box {
263 | border: 2px dotted #38f;
264 | background: rgba(255,255,255,0.5);
265 | }
266 |
267 |
268 | /* general typography */
269 | .leaflet-container {
270 | font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
271 | }
272 |
273 |
274 | /* general toolbar styles */
275 |
276 | .leaflet-bar {
277 | box-shadow: 0 1px 5px rgba(0,0,0,0.65);
278 | border-radius: 4px;
279 | }
280 | .leaflet-bar a,
281 | .leaflet-bar a:hover {
282 | background-color: #fff;
283 | border-bottom: 1px solid #ccc;
284 | width: 26px;
285 | height: 26px;
286 | line-height: 26px;
287 | display: block;
288 | text-align: center;
289 | text-decoration: none;
290 | color: black;
291 | }
292 | .leaflet-bar a,
293 | .leaflet-control-layers-toggle {
294 | background-position: 50% 50%;
295 | background-repeat: no-repeat;
296 | display: block;
297 | }
298 | .leaflet-bar a:hover {
299 | background-color: #f4f4f4;
300 | }
301 | .leaflet-bar a:first-child {
302 | border-top-left-radius: 4px;
303 | border-top-right-radius: 4px;
304 | }
305 | .leaflet-bar a:last-child {
306 | border-bottom-left-radius: 4px;
307 | border-bottom-right-radius: 4px;
308 | border-bottom: none;
309 | }
310 | .leaflet-bar a.leaflet-disabled {
311 | cursor: default;
312 | background-color: #f4f4f4;
313 | color: #bbb;
314 | }
315 |
316 | .leaflet-touch .leaflet-bar a {
317 | width: 30px;
318 | height: 30px;
319 | line-height: 30px;
320 | }
321 | .leaflet-touch .leaflet-bar a:first-child {
322 | border-top-left-radius: 2px;
323 | border-top-right-radius: 2px;
324 | }
325 | .leaflet-touch .leaflet-bar a:last-child {
326 | border-bottom-left-radius: 2px;
327 | border-bottom-right-radius: 2px;
328 | }
329 |
330 | /* zoom control */
331 |
332 | .leaflet-control-zoom-in,
333 | .leaflet-control-zoom-out {
334 | font: bold 18px 'Lucida Console', Monaco, monospace;
335 | text-indent: 1px;
336 | }
337 |
338 | .leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
339 | font-size: 22px;
340 | }
341 |
342 |
343 | /* layers control */
344 |
345 | .leaflet-control-layers {
346 | box-shadow: 0 1px 5px rgba(0,0,0,0.4);
347 | background: #fff;
348 | border-radius: 5px;
349 | }
350 | .leaflet-control-layers-toggle {
351 | background-image: url(images/layers.png);
352 | width: 36px;
353 | height: 36px;
354 | }
355 | .leaflet-retina .leaflet-control-layers-toggle {
356 | background-image: url(images/layers-2x.png);
357 | background-size: 26px 26px;
358 | }
359 | .leaflet-touch .leaflet-control-layers-toggle {
360 | width: 44px;
361 | height: 44px;
362 | }
363 | .leaflet-control-layers .leaflet-control-layers-list,
364 | .leaflet-control-layers-expanded .leaflet-control-layers-toggle {
365 | display: none;
366 | }
367 | .leaflet-control-layers-expanded .leaflet-control-layers-list {
368 | display: block;
369 | position: relative;
370 | }
371 | .leaflet-control-layers-expanded {
372 | padding: 6px 10px 6px 6px;
373 | color: #333;
374 | background: #fff;
375 | }
376 | .leaflet-control-layers-scrollbar {
377 | overflow-y: scroll;
378 | overflow-x: hidden;
379 | padding-right: 5px;
380 | }
381 | .leaflet-control-layers-selector {
382 | margin-top: 2px;
383 | position: relative;
384 | top: 1px;
385 | }
386 | .leaflet-control-layers label {
387 | display: block;
388 | }
389 | .leaflet-control-layers-separator {
390 | height: 0;
391 | border-top: 1px solid #ddd;
392 | margin: 5px -10px 5px -6px;
393 | }
394 |
395 | /* Default icon URLs */
396 | .leaflet-default-icon-path {
397 | background-image: url(images/marker-icon.png);
398 | }
399 |
400 |
401 | /* attribution and scale controls */
402 |
403 | .leaflet-container .leaflet-control-attribution {
404 | background: #fff;
405 | background: rgba(255, 255, 255, 0.7);
406 | margin: 0;
407 | }
408 | .leaflet-control-attribution,
409 | .leaflet-control-scale-line {
410 | padding: 0 5px;
411 | color: #333;
412 | }
413 | .leaflet-control-attribution a {
414 | text-decoration: none;
415 | }
416 | .leaflet-control-attribution a:hover {
417 | text-decoration: underline;
418 | }
419 | .leaflet-container .leaflet-control-attribution,
420 | .leaflet-container .leaflet-control-scale {
421 | font-size: 11px;
422 | }
423 | .leaflet-left .leaflet-control-scale {
424 | margin-left: 5px;
425 | }
426 | .leaflet-bottom .leaflet-control-scale {
427 | margin-bottom: 5px;
428 | }
429 | .leaflet-control-scale-line {
430 | border: 2px solid #777;
431 | border-top: none;
432 | line-height: 1.1;
433 | padding: 2px 5px 1px;
434 | font-size: 11px;
435 | white-space: nowrap;
436 | overflow: hidden;
437 | -moz-box-sizing: border-box;
438 | box-sizing: border-box;
439 |
440 | background: #fff;
441 | background: rgba(255, 255, 255, 0.5);
442 | }
443 | .leaflet-control-scale-line:not(:first-child) {
444 | border-top: 2px solid #777;
445 | border-bottom: none;
446 | margin-top: -2px;
447 | }
448 | .leaflet-control-scale-line:not(:first-child):not(:last-child) {
449 | border-bottom: 2px solid #777;
450 | }
451 |
452 | .leaflet-touch .leaflet-control-attribution,
453 | .leaflet-touch .leaflet-control-layers,
454 | .leaflet-touch .leaflet-bar {
455 | box-shadow: none;
456 | }
457 | .leaflet-touch .leaflet-control-layers,
458 | .leaflet-touch .leaflet-bar {
459 | border: 2px solid rgba(0,0,0,0.2);
460 | background-clip: padding-box;
461 | }
462 |
463 |
464 | /* popup */
465 |
466 | .leaflet-popup {
467 | position: absolute;
468 | text-align: center;
469 | margin-bottom: 20px;
470 | }
471 | .leaflet-popup-content-wrapper {
472 | padding: 1px;
473 | text-align: left;
474 | border-radius: 12px;
475 | }
476 | .leaflet-popup-content {
477 | margin: 13px 19px;
478 | line-height: 1.4;
479 | }
480 | .leaflet-popup-content p {
481 | margin: 18px 0;
482 | }
483 | .leaflet-popup-tip-container {
484 | width: 40px;
485 | height: 20px;
486 | position: absolute;
487 | left: 50%;
488 | margin-left: -20px;
489 | overflow: hidden;
490 | pointer-events: none;
491 | }
492 | .leaflet-popup-tip {
493 | width: 17px;
494 | height: 17px;
495 | padding: 1px;
496 |
497 | margin: -10px auto 0;
498 |
499 | -webkit-transform: rotate(45deg);
500 | -moz-transform: rotate(45deg);
501 | -ms-transform: rotate(45deg);
502 | transform: rotate(45deg);
503 | }
504 | .leaflet-popup-content-wrapper,
505 | .leaflet-popup-tip {
506 | background: white;
507 | color: #333;
508 | box-shadow: 0 3px 14px rgba(0,0,0,0.4);
509 | }
510 | .leaflet-container a.leaflet-popup-close-button {
511 | position: absolute;
512 | top: 0;
513 | right: 0;
514 | padding: 4px 4px 0 0;
515 | border: none;
516 | text-align: center;
517 | width: 18px;
518 | height: 14px;
519 | font: 16px/14px Tahoma, Verdana, sans-serif;
520 | color: #c3c3c3;
521 | text-decoration: none;
522 | font-weight: bold;
523 | background: transparent;
524 | }
525 | .leaflet-container a.leaflet-popup-close-button:hover {
526 | color: #999;
527 | }
528 | .leaflet-popup-scrolled {
529 | overflow: auto;
530 | border-bottom: 1px solid #ddd;
531 | border-top: 1px solid #ddd;
532 | }
533 |
534 | .leaflet-oldie .leaflet-popup-content-wrapper {
535 | -ms-zoom: 1;
536 | }
537 | .leaflet-oldie .leaflet-popup-tip {
538 | width: 24px;
539 | margin: 0 auto;
540 |
541 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
542 | filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
543 | }
544 | .leaflet-oldie .leaflet-popup-tip-container {
545 | margin-top: -1px;
546 | }
547 |
548 | .leaflet-oldie .leaflet-control-zoom,
549 | .leaflet-oldie .leaflet-control-layers,
550 | .leaflet-oldie .leaflet-popup-content-wrapper,
551 | .leaflet-oldie .leaflet-popup-tip {
552 | border: 1px solid #999;
553 | }
554 |
555 |
556 | /* div icon */
557 |
558 | .leaflet-div-icon {
559 | background: #fff;
560 | border: 1px solid #666;
561 | }
562 |
563 |
564 | /* Tooltip */
565 | /* Base styles for the element that has a tooltip */
566 | .leaflet-tooltip {
567 | position: absolute;
568 | padding: 6px;
569 | background-color: #fff;
570 | border: 1px solid #fff;
571 | border-radius: 3px;
572 | color: #222;
573 | white-space: nowrap;
574 | -webkit-user-select: none;
575 | -moz-user-select: none;
576 | -ms-user-select: none;
577 | user-select: none;
578 | pointer-events: none;
579 | box-shadow: 0 1px 3px rgba(0,0,0,0.4);
580 | }
581 | .leaflet-tooltip.leaflet-clickable {
582 | cursor: pointer;
583 | pointer-events: auto;
584 | }
585 | .leaflet-tooltip-top:before,
586 | .leaflet-tooltip-bottom:before,
587 | .leaflet-tooltip-left:before,
588 | .leaflet-tooltip-right:before {
589 | position: absolute;
590 | pointer-events: none;
591 | border: 6px solid transparent;
592 | background: transparent;
593 | content: "";
594 | }
595 |
596 | /* Directions */
597 |
598 | .leaflet-tooltip-bottom {
599 | margin-top: 6px;
600 | }
601 | .leaflet-tooltip-top {
602 | margin-top: -6px;
603 | }
604 | .leaflet-tooltip-bottom:before,
605 | .leaflet-tooltip-top:before {
606 | left: 50%;
607 | margin-left: -6px;
608 | }
609 | .leaflet-tooltip-top:before {
610 | bottom: 0;
611 | margin-bottom: -12px;
612 | border-top-color: #fff;
613 | }
614 | .leaflet-tooltip-bottom:before {
615 | top: 0;
616 | margin-top: -12px;
617 | margin-left: -6px;
618 | border-bottom-color: #fff;
619 | }
620 | .leaflet-tooltip-left {
621 | margin-left: -6px;
622 | }
623 | .leaflet-tooltip-right {
624 | margin-left: 6px;
625 | }
626 | .leaflet-tooltip-left:before,
627 | .leaflet-tooltip-right:before {
628 | top: 50%;
629 | margin-top: -6px;
630 | }
631 | .leaflet-tooltip-left:before {
632 | right: 0;
633 | margin-right: -12px;
634 | border-left-color: #fff;
635 | }
636 | .leaflet-tooltip-right:before {
637 | left: 0;
638 | margin-left: -12px;
639 | border-right-color: #fff;
640 | }
641 |
642 | .leaflet-marker-icon.leaflet-zoom-animated.leaflet-interactive {
643 | background-color:none!important;
644 | margin-left: -22px !important;
645 | margin-top: -55px !important;
646 | width: 50px !important;
647 | height: 50px !important;
648 | }
649 |
650 | .markdown-body img {
651 | background-color:unset !important;
652 | }
653 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | // A map plug-in under hexo, which supports rendering of beautiful interactive maps on article pages.
2 | // * author: guole
3 | // * https://guole.fun/
4 | // * license: Apache-2.0
5 | // * https://guole.fun/posts/41887//blob/main/LICENSE
6 | // {% map altLan, altLat, alt, zoom, mapWidth, mapHeight, tuceng %}
7 | // {% map 经度, 纬度, 文本, 缩放级别, 宽, 高, 图层 %}
8 | // 一个例子:{% map 114.533983, 22.569441,这里是西涌沙滩, 14, 100%, 360px, 1 %}
9 | // 一个例子:{% map %}
10 | // 使用说明:https://guole.fun/posts/41887/
11 |
12 | 'use strict';
13 |
14 | const css_text = ``;
15 | const js_text = ``;
16 | const ChineseTmsProviders = ``;
17 | const proj4 = ``;
18 | const proj4leaflet = ``;
19 | let geoq_txt = "GeoQ";
20 | let gaode_txt = "高德地图";
21 | let google_txt = "Google Maps";
22 | let baidu_txt = "Baidu Map";
23 |
24 | function hunhe(args){
25 | args = args.join(' ').split(',');
26 | let mapWidth = '100%';
27 | let mapHeight = '360px';
28 | let zoom = 14;
29 | let alt = '';
30 | let altLan = 113.884049;
31 | let altLat = 22.543389;
32 | if (args.length == 1) {
33 | alt = '这里是深圳欢乐港湾,有着亚洲最大的摩天轮!';
34 | } else if (args.length == 2) {
35 | altLan = args[0].trim();
36 | altLat = args[1].trim();
37 | } else if (args.length == 3) {
38 | altLan = args[0].trim();
39 | altLat = args[1].trim();
40 | alt = args[2].trim();
41 | } else if (args.length == 4) {
42 | altLan = args[0].trim();
43 | altLat = args[1].trim();
44 | alt = args[2].trim();
45 | zoom = args[3].trim();
46 | } else if (args.length == 5) {
47 | altLan = args[0].trim();
48 | altLat = args[1].trim();
49 | alt = args[2].trim();
50 | zoom = args[3].trim();
51 | mapWidth = args[4].trim();
52 | } else if (args.length == 6 || args.length == 7) {
53 | altLan = args[0].trim();
54 | altLat = args[1].trim();
55 | alt = args[2].trim();
56 | zoom = args[3].trim();
57 | mapWidth = args[4].trim();
58 | mapHeight = args[5].trim();
59 | } else if (args.length > 7 ) {
60 | console.error('>>>>>>>map标签错误:标签内参数不正确,请查看文档:https://guole.fun/posts/41887/');
61 | throw new Error('标签内参数不正确,请查看文档:https://guole.fun/posts/41887/');
62 | }
63 | let n = /^(\-|\+)?\d+(\.\d+)?$/; //匹配正负数,包含正负浮点数
64 | let r = /^\+?[1-9][0-9]*$/; //匹配正整数
65 | if (n.test(altLan) && n.test(altLat) && altLan <= 180 && altLan >= -180 && altLat <= 90 && altLat >= -90 ) {
66 | if (r.test(zoom)) {
67 | } else {
68 | console.error('>>>>>>>map标签错误:标签内经纬度或缩放等级值不正确。经度(-180~180),纬度(-90~90),缩放等级(3~18),文档:https://guole.fun/posts/41887/');
69 | throw new Error('标签内经纬度或缩放等级值不正确,请查看文档:https://guole.fun/posts/41887/');
70 | }
71 | } else {
72 | console.error('>>>>>>>map标签错误:标签内经纬度或缩放等级值不正确。经度(-180~180),纬度(-90~90),缩放等级(3~18),文档:https://guole.fun/posts/41887/');
73 | throw new Error('标签内经纬度或缩放等级值不正确,请查看文档:https://guole.fun/posts/41887/');
74 | }
75 | if (args.length >= 4) {
76 | if (zoom < 3 || zoom > 18 ) {
77 | console.error('>>>>>>>map标签错误:标签内缩放等级超出范围(3~18),请查看文档:https://guole.fun/posts/41887/');
78 | throw new Error('标签内缩放等级超出范围(3~18),请查看文档:https://guole.fun/posts/41887/');
79 | } else {}
80 | } else {}
81 | let mapid = 'map-' + altLan + '-' + altLat;
82 | let result = '';
83 | result += css_text;
84 | result += js_text;
85 | result += ChineseTmsProviders;
86 | result += '';
87 | result += '
';
88 | result += '
';
89 | result += '';
121 | return result;
122 | } else {
123 | result += "var marker = L.marker(['" + altLat + "','" + altLan + "']).addTo(mymap);";
124 | result += 'marker.bindPopup("' + alt + '").openPopup();';
125 | result += '';
126 | return result;
127 | }
128 | };
129 | hexo.extend.tag.register('map', hunhe);
130 | hexo.extend.tag.register('Map', hunhe);
131 |
132 | function gaode(args){
133 | args = args.join(' ').split(',');
134 | let mapWidth = '100%';
135 | let mapHeight = '360px';
136 | let zoom = 14;
137 | let alt = '';
138 | let altLan = 117.086471;
139 | let altLat = 36.264217;
140 | if (args.length == 1) {
141 | alt = '这里是东岳泰山,海拔1532.7米!';
142 | } else if (args.length == 2) {
143 | altLan = args[0].trim();
144 | altLat = args[1].trim();
145 | } else if (args.length == 3) {
146 | altLan = args[0].trim();
147 | altLat = args[1].trim();
148 | alt = args[2].trim();
149 | } else if (args.length == 4) {
150 | altLan = args[0].trim();
151 | altLat = args[1].trim();
152 | alt = args[2].trim();
153 | zoom = args[3].trim();
154 | } else if (args.length == 5) {
155 | altLan = args[0].trim();
156 | altLat = args[1].trim();
157 | alt = args[2].trim();
158 | zoom = args[3].trim();
159 | mapWidth = args[4].trim();
160 | } else if (args.length == 6 || args.length == 7) {
161 | altLan = args[0].trim();
162 | altLat = args[1].trim();
163 | alt = args[2].trim();
164 | zoom = args[3].trim();
165 | mapWidth = args[4].trim();
166 | mapHeight = args[5].trim();
167 | } else if (args.length > 7 ) {
168 | console.error('>>>>>>>gaodeMap标签错误:标签内参数不正确,请查看文档:https://guole.fun/posts/41887/');
169 | throw new Error('标签内参数不正确,请查看文档:https://guole.fun/posts/41887/');
170 | }
171 | let n = /^(\-|\+)?\d+(\.\d+)?$/; //匹配正负数,包含正负浮点数
172 | let r = /^\+?[1-9][0-9]*$/; //匹配正整数
173 | if (n.test(altLan) && n.test(altLat) && altLan <= 180 && altLan >= -180 && altLat <= 90 && altLat >= -90 ) {
174 | if (r.test(zoom)) {
175 | } else {
176 | console.error('>>>>>>>gaodeMap标签错误:标签内经纬度或缩放等级值不正确。经度(-180~180),纬度(-90~90),缩放等级(3~18),文档:https://guole.fun/posts/41887/');
177 | throw new Error('标签内经纬度或缩放等级值不正确,文档:https://guole.fun/posts/41887/');
178 | }
179 | } else {
180 | console.error('>>>>>>>gaodeMap标签错误:标签内经纬度或缩放等级值不正确。经度(-180~180),纬度(-90~90),缩放等级(3~18),文档:https://guole.fun/posts/41887/');
181 | throw new Error('标签内经纬度或缩放等级值不正确,请查看文档:https://guole.fun/posts/41887/');
182 | }
183 | if (args.length >= 4) {
184 | if (zoom < 3 || zoom > 18 ) {
185 | console.error('>>>>>>>gaodeMap标签错误:标签内缩放等级超出范围(3~18),请查看文档:https://guole.fun/posts/41887/');
186 | throw new Error('标签内缩放等级超出范围(3~18),请查看文档:https://guole.fun/posts/41887/');
187 | } else {}
188 | } else {}
189 | let mapid = 'gaodeMap-' + altLan + '-' + altLat;
190 | let result = '';
191 | result += css_text;
192 | result += js_text;
193 | result += ChineseTmsProviders;
194 | result += '';
195 | result += '
';
196 | result += '
';
197 | result += '';
217 | return result;
218 | } else {
219 | result += "var marker = L.marker(['" + altLat + "','" + altLan + "']).addTo(mymap);";
220 | result += 'marker.bindPopup("' + alt + '").openPopup();';
221 | result += '';
222 | return result;
223 | }
224 | };
225 | hexo.extend.tag.register('gaodeMap', gaode);
226 | hexo.extend.tag.register('GaodeMap', gaode);
227 | hexo.extend.tag.register('Amap', gaode);
228 | hexo.extend.tag.register('amap', gaode);
229 |
230 | function openstreet(args){
231 | args = args.join(' ').split(',');
232 | let mapWidth = '100%';
233 | let mapHeight = '360px';
234 | let zoom = 14;
235 | let alt = '';
236 | let altLan = 113.892994;
237 | let altLat = 22.55025;
238 | if (args.length == 1) {
239 | alt = '这里是深圳欢乐港湾!';
240 | } else if (args.length == 2) {
241 | altLan = args[0].trim();
242 | altLat = args[1].trim();
243 | } else if (args.length == 3) {
244 | altLan = args[0].trim();
245 | altLat = args[1].trim();
246 | alt = args[2].trim();
247 | } else if (args.length == 4) {
248 | altLan = args[0].trim();
249 | altLat = args[1].trim();
250 | alt = args[2].trim();
251 | zoom = args[3].trim();
252 | } else if (args.length == 5) {
253 | altLan = args[0].trim();
254 | altLat = args[1].trim();
255 | alt = args[2].trim();
256 | zoom = args[3].trim();
257 | mapWidth = args[4].trim();
258 | } else if (args.length == 6) {
259 | altLan = args[0].trim();
260 | altLat = args[1].trim();
261 | alt = args[2].trim();
262 | zoom = args[3].trim();
263 | mapWidth = args[4].trim();
264 | mapHeight = args[5].trim();
265 | } else if (args.length > 6 ) {
266 | console.error('>>>>>>>openstreetMap标签错误:标签内参数不正确,请查看文档:https://guole.fun/posts/41887/');
267 | throw new Error('标签内参数不正确,请查看文档:https://guole.fun/posts/41887/');
268 | }
269 | let n = /^(\-|\+)?\d+(\.\d+)?$/; //匹配正负数,包含正负浮点数
270 | let r = /^\+?[1-9][0-9]*$/; //匹配正整数
271 | if (n.test(altLan) && n.test(altLat) && altLan <= 180 && altLan >= -180 && altLat <= 90 && altLat >= -90 ) {
272 | if (r.test(zoom)) {
273 | } else {
274 | console.error('>>>>>>>openstreetMap标签错误:标签内经纬度或缩放等级值不正确。经度(-180~180),纬度(-90~90),缩放等级(1~18),文档:https://guole.fun/posts/41887/');
275 | throw new Error('标签内经纬度或缩放等级值不正确,请查看文档:https://guole.fun/posts/41887/');
276 | }
277 | } else {
278 | console.error('>>>>>>>openstreetMap标签错误:标签内经纬度或缩放等级值不正确。经度(-180~180),纬度(-90~90),缩放等级(1~18),文档:https://guole.fun/posts/41887/');
279 | throw new Error('标签内经纬度或缩放等级值不正确,请查看文档:https://guole.fun/posts/41887/');
280 | }
281 | if (args.length >= 4) {
282 | if (zoom < 1 || zoom > 18 ) {
283 | console.error('>>>>>>>openstreetMap标签错误:标签内缩放等级超出范围(1~18),请查看文档:https://guole.fun/posts/41887/');
284 | throw new Error('标签内缩放等级超出范围(1~18),请查看文档:https://guole.fun/posts/41887/');
285 | } else {}
286 | } else {}
287 | let mapid = 'openstreetMap-' + altLan + '-' + altLat;
288 | let result = '';
289 | result += css_text;
290 | result += js_text;
291 | result += '';
292 | result += '
';
293 | result += '
';
294 | result += '';
300 | return result;
301 | } else {
302 | result += 'marker.bindPopup("' + alt + '").openPopup();';
303 | result += '';
304 | return result;
305 | }
306 | };
307 | hexo.extend.tag.register('openstreetMap', openstreet);
308 | hexo.extend.tag.register('OpenStreetMap', openstreet);
309 |
310 | function baidu(args){
311 | args = args.join(' ').split(',');
312 | let mapWidth = '100%';
313 | let mapHeight = '360px';
314 | let zoom = 14;
315 | let alt = '';
316 | let altLan = 110.073028;
317 | let altLat = 34.497647;
318 | if (args.length == 1) {
319 | alt = '这里是西岳华山,海拔2154.9米!';
320 | } else if (args.length == 2) {
321 | altLan = args[0].trim();
322 | altLat = args[1].trim();
323 | } else if (args.length == 3) {
324 | altLan = args[0].trim();
325 | altLat = args[1].trim();
326 | alt = args[2].trim();
327 | } else if (args.length == 4) {
328 | altLan = args[0].trim();
329 | altLat = args[1].trim();
330 | alt = args[2].trim();
331 | zoom = args[3].trim();
332 | } else if (args.length == 5) {
333 | altLan = args[0].trim();
334 | altLat = args[1].trim();
335 | alt = args[2].trim();
336 | zoom = args[3].trim();
337 | mapWidth = args[4].trim();
338 | } else if (args.length == 6 || args.length == 7) {
339 | altLan = args[0].trim();
340 | altLat = args[1].trim();
341 | alt = args[2].trim();
342 | zoom = args[3].trim();
343 | mapWidth = args[4].trim();
344 | mapHeight = args[5].trim();
345 | } else if (args.length > 7 ) {
346 | console.error('>>>>>>>baiduMap标签错误:标签内参数不正确,请查看文档:https://guole.fun/posts/41887/');
347 | throw new Error('标签内参数不正确,请查看文档:https://guole.fun/posts/41887/');
348 | }
349 | let n = /^(\-|\+)?\d+(\.\d+)?$/; //匹配正负数,包含正负浮点数
350 | let r = /^\+?[1-9][0-9]*$/; //匹配正整数
351 | if (n.test(altLan) && n.test(altLat) && altLan <= 180 && altLan >= -180 && altLat <= 90 && altLat >= -90 ) {
352 | if (r.test(zoom)) {
353 | } else {
354 | console.error('>>>>>>>baiduMap标签错误:标签内经纬度或缩放等级值不正确。经度(-180~180),纬度(-90~90),缩放等级(4~18),文档:https://guole.fun/posts/41887/');
355 | throw new Error('标签内经纬度或缩放等级值不正确,请查看文档:https://guole.fun/posts/41887/');
356 | }
357 | } else {
358 | console.error('>>>>>>>baiduMap标签错误:标签内经纬度或缩放等级值不正确。经度(-180~180),纬度(-90~90),缩放等级(4~18),文档:https://guole.fun/posts/41887/');
359 | throw new Error('标签内经纬度或缩放等级值不正确,请查看文档:https://guole.fun/posts/41887/');
360 | }
361 | if (args.length >= 4) {
362 | if (zoom < 4 || zoom > 18 ) {
363 | console.error('>>>>>>>baiduMap标签错误:标签内缩放等级超出范围(4~18),请查看文档:https://guole.fun/posts/41887/');
364 | throw new Error('标签内缩放等级超出范围(4~18),请查看文档:https://guole.fun/posts/41887/');
365 | } else {}
366 | } else {}
367 | let mapid = 'baiduMap-' + altLan + '-' + altLat;
368 | let result = '';
369 | result += css_text;
370 | result += js_text;
371 | result += proj4;
372 | result += proj4leaflet;
373 | result += ChineseTmsProviders;
374 | result += '';
375 | result += '';
391 | return result;
392 | } else {
393 | result += "var marker = L.marker(['" + altLat + "','" + altLan + "']).addTo(mymap);";
394 | result += 'marker.bindPopup("' + alt + '").openPopup();';
395 | result += '';
396 | return result;
397 | }
398 | };
399 | hexo.extend.tag.register('baiduMap', baidu);
400 | hexo.extend.tag.register('BaiduMap', baidu);
401 |
402 | function geoq(args){
403 | args = args.join(' ').split(',');
404 | let mapWidth = '100%';
405 | let mapHeight = '360px';
406 | let zoom = 14;
407 | let alt = '';
408 | let altLan = 114.058975;
409 | let altLat = 22.543754;
410 | if (args.length == 1) {
411 | alt = '这里是中国深圳!';
412 | } else if (args.length == 2) {
413 | altLan = args[0].trim();
414 | altLat = args[1].trim();
415 | } else if (args.length == 3) {
416 | altLan = args[0].trim();
417 | altLat = args[1].trim();
418 | alt = args[2].trim();
419 | } else if (args.length == 4) {
420 | altLan = args[0].trim();
421 | altLat = args[1].trim();
422 | alt = args[2].trim();
423 | zoom = args[3].trim();
424 | } else if (args.length == 5) {
425 | altLan = args[0].trim();
426 | altLat = args[1].trim();
427 | alt = args[2].trim();
428 | zoom = args[3].trim();
429 | mapWidth = args[4].trim();
430 | } else if (args.length == 6 || args.length == 7) {
431 | altLan = args[0].trim();
432 | altLat = args[1].trim();
433 | alt = args[2].trim();
434 | zoom = args[3].trim();
435 | mapWidth = args[4].trim();
436 | mapHeight = args[5].trim();
437 | } else if (args.length > 7 ) {
438 | console.error('>>>>>>>geoqMap标签错误:标签内参数不正确,请查看文档:https://guole.fun/posts/41887/');
439 | throw new Error('标签内参数不正确,请查看文档:https://guole.fun/posts/41887/');
440 | }
441 | let n = /^(\-|\+)?\d+(\.\d+)?$/; //匹配正负数,包含正负浮点数
442 | let r = /^\+?[1-9][0-9]*$/; //匹配正整数
443 | if (n.test(altLan) && n.test(altLat) && altLan <= 180 && altLan >= -180 && altLat <= 90 && altLat >= -90 ) {
444 | if (r.test(zoom)) {
445 | } else {
446 | console.error('>>>>>>>geoqMap标签错误:标签内经纬度或缩放等级值不正确。经度(-180~180),纬度(-90~90),缩放等级(1~18),文档:https://guole.fun/posts/41887/');
447 | throw new Error('标签内经纬度或缩放等级值不正确,请查看文档:https://guole.fun/posts/41887/');
448 | }
449 | } else {
450 | console.error('>>>>>>>geoqMap标签错误:标签内经纬度或缩放等级值不正确。经度(-180~180),纬度(-90~90),缩放等级(1~18),文档:https://guole.fun/posts/41887/');
451 | throw new Error('标签内经纬度或缩放等级值不正确,请查看文档:https://guole.fun/posts/41887/');
452 | }
453 | if (args.length >= 4) {
454 | if (zoom < 1 || zoom > 18 ) {
455 | console.error('>>>>>>>geoqMap标签错误:标签内缩放等级超出范围(1~18),请查看文档:https://guole.fun/posts/41887/');
456 | throw new Error('标签内缩放等级超出范围(1~18),请查看文档:https://guole.fun/posts/41887/');
457 | } else {}
458 | } else {}
459 | let mapid = 'geoqMap-' + altLan + '-' + altLat;
460 | let result = '';
461 | result += css_text;
462 | result += js_text;
463 | result += ChineseTmsProviders;
464 | result += '';
465 | result += '';
491 | return result;
492 | } else {
493 | result += "var marker = L.marker(['" + altLat + "','" + altLan + "']).addTo(mymap);";
494 | result += 'marker.bindPopup("' + alt + '").openPopup();';
495 | result += '';
496 | return result;
497 | }
498 | };
499 | hexo.extend.tag.register('geoqMap', geoq);
500 | hexo.extend.tag.register('GeoqMap', geoq);
501 | hexo.extend.tag.register('GeoQ', geoq);
502 |
503 | function google(args){
504 | args = args.join(' ').split(',');
505 | let mapWidth = '100%';
506 | let mapHeight = '360px';
507 | let zoom = 14;
508 | let alt = '';
509 | let altLan = 104.077795;
510 | let altLat = 30.65555;
511 | if (args.length == 1) {
512 | alt = '这里是成都春熙路,超多小姐姐!';
513 | } else if (args.length == 2) {
514 | altLan = args[0].trim();
515 | altLat = args[1].trim();
516 | } else if (args.length == 3) {
517 | altLan = args[0].trim();
518 | altLat = args[1].trim();
519 | alt = args[2].trim();
520 | } else if (args.length == 4) {
521 | altLan = args[0].trim();
522 | altLat = args[1].trim();
523 | alt = args[2].trim();
524 | zoom = args[3].trim();
525 | } else if (args.length == 5) {
526 | altLan = args[0].trim();
527 | altLat = args[1].trim();
528 | alt = args[2].trim();
529 | zoom = args[3].trim();
530 | mapWidth = args[4].trim();
531 | } else if (args.length == 6 || args.length == 7) {
532 | altLan = args[0].trim();
533 | altLat = args[1].trim();
534 | alt = args[2].trim();
535 | zoom = args[3].trim();
536 | mapWidth = args[4].trim();
537 | mapHeight = args[5].trim();
538 | } else if (args.length > 7 ) {
539 | console.error('>>>>>>>googleMap标签错误:标签内参数不正确,请查看文档:https://guole.fun/posts/41887/');
540 | throw new Error('标签内参数不正确,请查看文档:https://guole.fun/posts/41887/');
541 | }
542 | let n = /^(\-|\+)?\d+(\.\d+)?$/; //匹配正负数,包含正负浮点数
543 | let r = /^\+?[1-9][0-9]*$/; //匹配正整数
544 | if (n.test(altLan) && n.test(altLat) && altLan <= 180 && altLan >= -180 && altLat <= 90 && altLat >= -90 ) {
545 | if (r.test(zoom)) {
546 | } else {
547 | console.error('>>>>>>>googleMap标签错误:标签内经纬度或缩放等级值不正确。经度(-180~180),纬度(-90~90),缩放等级(1~20),文档:https://guole.fun/posts/41887/');
548 | throw new Error('标签内经纬度或缩放等级值不正确,请查看文档:https://guole.fun/posts/41887/');
549 | }
550 | } else {
551 | console.error('>>>>>>>googleMap标签错误:标签内经纬度或缩放等级值不正确。经度(-180~180),纬度(-90~90),缩放等级(1~20),文档:https://guole.fun/posts/41887/');
552 | throw new Error('标签内经纬度或缩放等级值不正确,请查看文档:https://guole.fun/posts/41887/');
553 | }
554 | if (args.length >= 4) {
555 | if (zoom < 1 || zoom > 20 ) {
556 | console.error('>>>>>>>googleMap标签错误:标签内缩放等级超出范围(1~20),请查看文档:https://guole.fun/posts/41887/');
557 | throw new Error('标签内缩放等级超出范围(1~20),请查看文档:https://guole.fun/posts/41887/');
558 | } else {}
559 | } else {}
560 | let mapid = 'googleMap-' + altLan + '-' + altLat;
561 | let result = '';
562 | result += css_text;
563 | result += js_text;
564 | result += ChineseTmsProviders;
565 | result += '';
566 | result += '';
584 | return result;
585 | } else {
586 | result += "var marker = L.marker(['" + altLat + "','" + altLan + "']).addTo(mymap);";
587 | result += 'marker.bindPopup("' + alt + '").openPopup();';
588 | result += '';
589 | return result;
590 | }
591 | };
592 | hexo.extend.tag.register('googleMap', google);
593 | hexo.extend.tag.register('GoogleMap', google);
594 |
--------------------------------------------------------------------------------
/lib/proj4@2.4.3.js:
--------------------------------------------------------------------------------
1 | !function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.proj4=b()}(this,function(){"use strict";function a(a,b){if(a[b])return a[b];for(var c,d,e=Object.keys(a),f=b.toLowerCase().replace(Ob,""),g=-1;++g0?90:-90),a.lat_ts=a.lat1)}function i(a){var b=this;if(2===arguments.length){var c=arguments[1];"string"==typeof c?"+"===c.charAt(0)?i[a]=Pb(arguments[1]):i[a]=ac(arguments[1]):i[a]=c}else if(1===arguments.length){if(Array.isArray(a))return a.map(function(a){Array.isArray(a)?i.apply(b,a):i(a)});if("string"==typeof a){if(a in i)return i[a]}else"EPSG"in a?i["EPSG:"+a.EPSG]=a:"ESRI"in a?i["ESRI:"+a.ESRI]=a:"IAU2000"in a?i["IAU2000:"+a.IAU2000]=a:console.log(a);return}}function j(a){return"string"==typeof a}function k(a){return a in i}function l(a){return bc.some(function(b){return a.indexOf(b)>-1})}function m(a){return"+"===a[0]}function n(a){return j(a)?k(a)?i[a]:l(a)?ac(a):m(a)?Pb(a):void 0:a}function o(){var a=this.b/this.a;this.es=1-a*a,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=dc(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function p(a){var b=a.x,c=a.y;if(c*Ib>90&&c*Ib<-90&&b*Ib>180&&b*Ib<-180)return null;var d,e;if(Math.abs(Math.abs(c)-Cb)<=Gb)return null;if(this.sphere)d=this.x0+this.a*this.k0*fc(b-this.long0),e=this.y0+this.a*this.k0*Math.log(Math.tan(Jb+.5*c));else{var f=Math.sin(c),g=gc(this.e,c,f);d=this.x0+this.a*this.k0*fc(b-this.long0),e=this.y0-this.a*this.k0*Math.log(g)}return a.x=d,a.y=e,a}function q(a){var b,c,d=a.x-this.x0,e=a.y-this.y0;if(this.sphere)c=Cb-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var f=Math.exp(-e/(this.a*this.k0));if(c=hc(this.e,f),c===-9999)return null}return b=fc(this.long0+d/(this.a*this.k0)),a.x=b,a.y=c,a}function r(){}function s(a){return a}function t(a,b){var c=oc.length;return a.names?(oc[c]=a,a.names.forEach(function(a){nc[a.toLowerCase()]=c}),this):(console.log(b),!0)}function u(a){if(!a)return!1;var b=a.toLowerCase();return"undefined"!=typeof nc[b]&&oc[nc[b]]?oc[nc[b]]:void 0}function v(){mc.forEach(t)}function w(a,b,c,d){var e=a*a,f=b*b,g=(e-f)/e,h=0;d?(a*=1-g*(Db+g*(Eb+g*Fb)),e=a*a,g=0):h=Math.sqrt(g);var i=(e-f)/f;return{es:g,e:h,ep2:i}}function x(b,c,d,e,f){if(!b){var g=a(qc,e);g||(g=rc),b=g.a,c=g.b,d=g.rf}return d&&!c&&(c=(1-1/d)*b),(0===d||Math.abs(b-c)3&&(0===g.datum_params[3]&&0===g.datum_params[4]&&0===g.datum_params[5]&&0===g.datum_params[6]||(g.datum_type=yb,g.datum_params[3]*=Bb,g.datum_params[4]*=Bb,g.datum_params[5]*=Bb,g.datum_params[6]=g.datum_params[6]/1e6+1))),g.a=c,g.b=d,g.es=e,g.ep2=f,g}function z(b,c){if(!(this instanceof z))return new z(b);c=c||function(a){if(a)throw a};var d=n(b);if("object"!=typeof d)return void c(b);var e=z.projections.get(d.projName);if(!e)return void c(b);if(d.datumCode&&"none"!==d.datumCode){var f=a(sc,d.datumCode);f&&(d.datum_params=f.towgs84?f.towgs84.split(","):null,d.ellps=f.ellipse,d.datumName=f.datumName?f.datumName:d.datumCode)}d.k0=d.k0||1,d.axis=d.axis||"enu",d.ellps=d.ellps||"wgs84";var g=x(d.a,d.b,d.rf,d.ellps,d.sphere),h=w(g.a,g.b,g.rf,d.R_A),i=d.datum||y(d.datumCode,d.datum_params,g.a,g.b,h.es,h.ep2);cc(this,d),cc(this,e),this.a=g.a,this.b=g.b,this.rf=g.rf,this.sphere=g.sphere,this.es=h.es,this.e=h.e,this.ep2=h.ep2,this.datum=i,this.init(),c(null,this)}function A(a,b){return a.datum_type===b.datum_type&&(!(a.a!==b.a||Math.abs(a.es-b.es)>5e-11)&&(a.datum_type===xb?a.datum_params[0]===b.datum_params[0]&&a.datum_params[1]===b.datum_params[1]&&a.datum_params[2]===b.datum_params[2]:a.datum_type!==yb||a.datum_params[0]===b.datum_params[0]&&a.datum_params[1]===b.datum_params[1]&&a.datum_params[2]===b.datum_params[2]&&a.datum_params[3]===b.datum_params[3]&&a.datum_params[4]===b.datum_params[4]&&a.datum_params[5]===b.datum_params[5]&&a.datum_params[6]===b.datum_params[6]))}function B(a,b,c){var d,e,f,g,h=a.x,i=a.y,j=a.z?a.z:0;if(i<-Cb&&i>-1.001*Cb)i=-Cb;else if(i>Cb&&i<1.001*Cb)i=Cb;else if(i<-Cb||i>Cb)return null;return h>Math.PI&&(h-=2*Math.PI),e=Math.sin(i),g=Math.cos(i),f=e*e,d=c/Math.sqrt(1-b*f),{x:(d+j)*g*Math.cos(h),y:(d+j)*g*Math.sin(h),z:(d*(1-b)+j)*e}}function C(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u=1e-12,v=u*u,w=30,x=a.x,y=a.y,z=a.z?a.z:0;if(e=Math.sqrt(x*x+y*y),f=Math.sqrt(x*x+y*y+z*z),e/cv&&q=56&&k<64&&l>=3&&l<12&&(j=32),k>=72&&k<84&&(l>=0&&l<9?j=31:l>=9&&l<21?j=33:l>=21&&l<33?j=35:l>=33&&l<42&&(j=37)),b=6*(j-1)-180+3,i=O(b),c=n/(1-n),d=m/Math.sqrt(1-n*Math.sin(p)*Math.sin(p)),e=Math.tan(p)*Math.tan(p),f=c*Math.cos(p)*Math.cos(p),g=Math.cos(p)*(q-i),h=m*((1-n/4-3*n*n/64-5*n*n*n/256)*p-(3*n/8+3*n*n/32+45*n*n*n/1024)*Math.sin(2*p)+(15*n*n/256+45*n*n*n/1024)*Math.sin(4*p)-35*n*n*n/3072*Math.sin(6*p));var r=o*d*(g+(1-e+f)*g*g*g/6+(5-18*e+e*e+72*f-58*c)*g*g*g*g*g/120)+5e5,s=o*(h+d*Math.tan(p)*(g*g/2+(5-e+9*f+4*f*f)*g*g*g*g/24+(61-58*e+e*e+600*f-330*c)*g*g*g*g*g*g/720));return k<0&&(s+=1e7),{northing:Math.round(s),easting:Math.round(r),zoneNumber:j,zoneLetter:S(k)}}function R(a){var b=a.northing,c=a.easting,d=a.zoneLetter,e=a.zoneNumber;if(e<0||e>60)return null;var f,g,h,i,j,k,l,m,n,o,p=.9996,q=6378137,r=.00669438,s=(1-Math.sqrt(1-r))/(1+Math.sqrt(1-r)),t=c-5e5,u=b;d<"N"&&(u-=1e7),m=6*(e-1)-180+3,f=r/(1-r),l=u/p,n=l/(q*(1-r/4-3*r*r/64-5*r*r*r/256)),o=n+(3*s/2-27*s*s*s/32)*Math.sin(2*n)+(21*s*s/16-55*s*s*s*s/32)*Math.sin(4*n)+151*s*s*s/96*Math.sin(6*n),g=q/Math.sqrt(1-r*Math.sin(o)*Math.sin(o)),h=Math.tan(o)*Math.tan(o),i=f*Math.cos(o)*Math.cos(o),j=q*(1-r)/Math.pow(1-r*Math.sin(o)*Math.sin(o),1.5),k=t/(g*p);var v=o-g*Math.tan(o)/j*(k*k/2-(5+3*h+10*i-4*i*i-9*f)*k*k*k*k/24+(61+90*h+298*i+45*h*h-252*f-3*i*i)*k*k*k*k*k*k/720);v=P(v);var w=(k-(1+2*h+i)*k*k*k/6+(5-2*i+28*h-3*i*i+8*f+24*h*h)*k*k*k*k*k/120)/Math.cos(o);w=m+P(w);var x;if(a.accuracy){var y=R({northing:a.northing+a.accuracy,easting:a.easting+a.accuracy,zoneLetter:a.zoneLetter,zoneNumber:a.zoneNumber});x={top:y.lat,right:y.lon,bottom:v,left:w}}else x={lat:v,lon:w};return x}function S(a){var b="Z";return 84>=a&&a>=72?b="X":72>a&&a>=64?b="W":64>a&&a>=56?b="V":56>a&&a>=48?b="U":48>a&&a>=40?b="T":40>a&&a>=32?b="S":32>a&&a>=24?b="R":24>a&&a>=16?b="Q":16>a&&a>=8?b="P":8>a&&a>=0?b="N":0>a&&a>=-8?b="M":-8>a&&a>=-16?b="L":-16>a&&a>=-24?b="K":-24>a&&a>=-32?b="J":-32>a&&a>=-40?b="H":-40>a&&a>=-48?b="G":-48>a&&a>=-56?b="F":-56>a&&a>=-64?b="E":-64>a&&a>=-72?b="D":-72>a&&a>=-80&&(b="C"),b}function T(a,b){var c="00000"+a.easting,d="00000"+a.northing;return a.zoneNumber+a.zoneLetter+U(a.easting,a.northing,a.zoneNumber)+c.substr(c.length-5,b)+d.substr(d.length-5,b)}function U(a,b,c){var d=V(c),e=Math.floor(a/1e5),f=Math.floor(b/1e5)%20;return W(e,f,d)}function V(a){var b=a%xc;return 0===b&&(b=xc),b}function W(a,b,c){var d=c-1,e=yc.charCodeAt(d),f=zc.charCodeAt(d),g=e+a-1,h=f+b,i=!1;g>Ec&&(g=g-Ec+Ac-1,i=!0),(g===Bc||eBc||(g>Bc||eCc||(g>Cc||eEc&&(g=g-Ec+Ac-1),h>Dc?(h=h-Dc+Ac-1,i=!0):i=!1,(h===Bc||fBc||(h>Bc||fCc||(h>Cc||fDc&&(h=h-Dc+Ac-1);var j=String.fromCharCode(g)+String.fromCharCode(h);return j}function X(a){if(a&&0===a.length)throw"MGRSPoint coverting from nothing";for(var b,c=a.length,d=null,e="",f=0;!/[A-Z]/.test(b=a.charAt(f));){if(f>=2)throw"MGRSPoint bad conversion from: "+a;e+=b,f++}var g=parseInt(e,10);if(0===f||f+3>c)throw"MGRSPoint bad conversion from: "+a;var h=a.charAt(f++);if(h<="A"||"B"===h||"Y"===h||h>="Z"||"I"===h||"O"===h)throw"MGRSPoint zone letter "+h+" not handled: "+a;d=a.substring(f,f+=2);for(var i=V(g),j=Y(d.charAt(0),i),k=Z(d.charAt(1),i);k<$(h);)k+=2e6;var l=c-f;if(l%2!==0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+a;var m,n,o,p,q,r=l/2,s=0,t=0;return r>0&&(m=1e5/Math.pow(10,r),n=a.substring(f,f+r),s=parseFloat(n)*m,o=a.substring(f+r),t=parseFloat(o)*m),p=s+j,q=t+k,{easting:p,northing:q,zoneLetter:h,zoneNumber:g,accuracy:m}}function Y(a,b){for(var c=yc.charCodeAt(b-1),d=1e5,e=!1;c!==a.charCodeAt(0);){if(c++,c===Bc&&c++,c===Cc&&c++,c>Ec){if(e)throw"Bad character: "+a;c=Ac,e=!0}d+=1e5}return d}function Z(a,b){if(a>"V")throw"MGRSPoint given invalid Northing "+a;for(var c=zc.charCodeAt(b-1),d=0,e=!1;c!==a.charCodeAt(0);){if(c++,c===Bc&&c++,c===Cc&&c++,c>Dc){if(e)throw"Bad character: "+a;c=Ac,e=!0}d+=1e5}return d}function $(a){var b;switch(a){case"C":b=11e5;break;case"D":b=2e6;break;case"E":b=28e5;break;case"F":b=37e5;break;case"G":b=46e5;break;case"H":b=55e5;break;case"J":b=64e5;break;case"K":b=73e5;break;case"L":b=82e5;break;case"M":b=91e5;break;case"N":b=0;break;case"P":b=8e5;break;case"Q":b=17e5;break;case"R":b=26e5;break;case"S":b=35e5;break;case"T":b=44e5;break;case"U":b=53e5;break;case"V":b=62e5;break;case"W":b=7e6;break;case"X":b=79e5;break;default:b=-1}if(b>=0)return b;throw"Invalid zone letter: "+a}function Point(a,b,c){if(!(this instanceof Point))return new Point(a,b,c);if(Array.isArray(a))this.x=a[0],this.y=a[1],this.z=a[2]||0;else if("object"==typeof a)this.x=a.x,this.y=a.y,this.z=a.z||0;else if("string"==typeof a&&"undefined"==typeof b){var d=a.split(",");this.x=parseFloat(d[0],10),this.y=parseFloat(d[1],10),this.z=parseFloat(d[2],10)||0}else this.x=a,this.y=b,this.z=c||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}function _(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Tc(this.es),this.ml0=Uc(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function aa(a){var b,c,d,e=a.x,f=a.y,g=fc(e-this.long0),h=Math.sin(f),i=Math.cos(f);if(this.es){var j=i*g,k=Math.pow(j,2),l=this.ep2*Math.pow(i,2),m=Math.pow(l,2),n=Math.abs(i)>Gb?Math.tan(f):0,o=Math.pow(n,2),p=Math.pow(o,2);b=1-this.es*Math.pow(h,2),j/=Math.sqrt(b);var q=Uc(f,h,i,this.en);c=this.a*(this.k0*j*(1+k/6*(1-o+l+k/20*(5-18*o+p+14*l-58*o*l+k/42*(61+179*p-p*o-479*o)))))+this.x0,d=this.a*(this.k0*(q-this.ml0+h*g*j/2*(1+k/12*(5-o+9*l+4*m+k/30*(61+p-58*o+270*l-330*o*l+k/56*(1385+543*p-p*o-3111*o))))))+this.y0}else{var r=i*Math.sin(g);if(Math.abs(Math.abs(r)-1)=1){if(r-1>Gb)return 93;d=0}else d=Math.acos(d);f<0&&(d=-d),d=this.a*this.k0*(d-this.lat0)+this.y0}return a.x=c,a.y=d,a}function ba(a){var b,c,d,e,f=(a.x-this.x0)*(1/this.a),g=(a.y-this.y0)*(1/this.a);if(this.es)if(b=this.ml0+g/this.k0,c=Wc(b,this.es,this.en),Math.abs(c)Gb?Math.tan(c):0,k=this.ep2*Math.pow(i,2),l=Math.pow(k,2),m=Math.pow(j,2),n=Math.pow(m,2);b=1-this.es*Math.pow(h,2);var o=f*Math.sqrt(b)/this.k0,p=Math.pow(o,2);b*=j,d=c-b*p/(1-this.es)*.5*(1-p/12*(5+3*m-9*k*m+k-4*l-p/30*(61+90*m-252*k*m+45*n+46*k-p/56*(1385+3633*m+4095*n+1574*n*m)))),e=fc(this.long0+o*(1-p/6*(1+2*m+k-p/20*(5+28*m+24*n+8*k*m+6*k-p/42*(61+662*m+1320*n+720*n*m))))/i)}else d=Cb*ec(g),e=0;else{var q=Math.exp(f/this.k0),r=.5*(q-1/q),s=this.lat0+g/this.k0,t=Math.cos(s);b=Math.sqrt((1-Math.pow(t,2))/(1+Math.pow(r,2))),d=Math.asin(b),g<0&&(d=-d),e=0===r&&0===t?0:fc(Math.atan2(r,t)+this.long0)}return a.x=e,a.y=d,a}function ca(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var a=this.es/(1+Math.sqrt(1-this.es)),b=a/(2-a),c=b;this.cgb[0]=b*(2+b*(-2/3+b*(-2+b*(116/45+b*(26/45+b*(-2854/675)))))),this.cbg[0]=b*(-2+b*(2/3+b*(4/3+b*(-82/45+b*(32/45+b*(4642/4725)))))),c*=b,this.cgb[1]=c*(7/3+b*(-1.6+b*(-227/45+b*(2704/315+b*(2323/945))))),this.cbg[1]=c*(5/3+b*(-16/15+b*(-13/9+b*(904/315+b*(-1522/945))))),c*=b,this.cgb[2]=c*(56/15+b*(-136/35+b*(-1262/105+b*(73814/2835)))),this.cbg[2]=c*(-26/15+b*(34/21+b*(1.6+b*(-12686/2835)))),c*=b,this.cgb[3]=c*(4279/630+b*(-332/35+b*(-399572/14175))),this.cbg[3]=c*(1237/630+b*(-2.4+b*(-24832/14175))),c*=b,this.cgb[4]=c*(4174/315+b*(-144838/6237)),this.cbg[4]=c*(-734/315+b*(109598/31185)),c*=b,this.cgb[5]=c*(601676/22275),this.cbg[5]=c*(444337/155925),c=Math.pow(b,2),this.Qn=this.k0/(1+b)*(1+c*(.25+c*(1/64+c/256))),this.utg[0]=b*(-.5+b*(2/3+b*(-37/96+b*(1/360+b*(81/512+b*(-96199/604800)))))),this.gtu[0]=b*(.5+b*(-2/3+b*(5/16+b*(41/180+b*(-127/288+b*(7891/37800)))))),this.utg[1]=c*(-1/48+b*(-1/15+b*(437/1440+b*(-46/105+b*(1118711/3870720))))),this.gtu[1]=c*(13/48+b*(-.6+b*(557/1440+b*(281/630+b*(-1983433/1935360))))),c*=b,this.utg[2]=c*(-17/480+b*(37/840+b*(209/4480+b*(-5569/90720)))),this.gtu[2]=c*(61/240+b*(-103/140+b*(15061/26880+b*(167603/181440)))),c*=b,this.utg[3]=c*(-4397/161280+b*(11/504+b*(830251/7257600))),this.gtu[3]=c*(49561/161280+b*(-179/168+b*(6601661/7257600))),c*=b,this.utg[4]=c*(-4583/161280+b*(108847/3991680)),this.gtu[4]=c*(34729/80640+b*(-3418889/1995840)),c*=b,this.utg[5]=c*-.03233083094085698,this.gtu[5]=.6650675310896665*c;var d=bd(this.cbg,this.lat0);this.Zb=-this.Qn*(d+cd(this.gtu,2*d))}function da(a){var b=fc(a.x-this.long0),c=a.y;c=bd(this.cbg,c);var d=Math.sin(c),e=Math.cos(c),f=Math.sin(b),g=Math.cos(b);c=Math.atan2(d,g*e),b=Math.atan2(f*e,$c(d,e*g)),b=ad(Math.tan(b));var h=ed(this.gtu,2*c,2*b);c+=h[0],b+=h[1];var i,j;return Math.abs(b)<=2.623395162778?(i=this.a*(this.Qn*b)+this.x0,j=this.a*(this.Qn*c+this.Zb)+this.y0):(i=1/0,j=1/0),a.x=i,a.y=j,a}function ea(a){var b=(a.x-this.x0)*(1/this.a),c=(a.y-this.y0)*(1/this.a);c=(c-this.Zb)/this.Qn,b/=this.Qn;var d,e;if(Math.abs(b)<=2.623395162778){var f=ed(this.utg,2*c,2*b);c+=f[0],b+=f[1],b=Math.atan(Zc(b));var g=Math.sin(c),h=Math.cos(c),i=Math.sin(b),j=Math.cos(b);c=Math.atan2(g*j,$c(i,j*h)),b=Math.atan2(i,j*h),d=fc(b+this.long0),e=bd(this.cgb,c)}else d=1/0,e=1/0;return a.x=d,a.y=e,a}function fa(){var a=hd(this.zone,this.long0);if(void 0===a)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(a)-183)*Hb,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,gd.init.apply(this),this.forward=gd.forward,this.inverse=gd.inverse}function ga(){var a=Math.sin(this.lat0),b=Math.cos(this.lat0);b*=b,this.rc=Math.sqrt(1-this.es)/(1-this.es*a*a),this.C=Math.sqrt(1+this.es*b*b/(1-this.es)),this.phic0=Math.asin(a/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Jb)/(Math.pow(Math.tan(.5*this.lat0+Jb),this.C)*ld(this.e*a,this.ratexp))}function ha(a){var b=a.x,c=a.y;return a.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*c+Jb),this.C)*ld(this.e*Math.sin(c),this.ratexp))-Cb,a.x=this.C*b,a}function ia(a){for(var b=1e-14,c=a.x/this.C,d=a.y,e=Math.pow(Math.tan(.5*d+Jb)/this.K,1/this.C),f=md;f>0&&(d=2*Math.atan(e*ld(this.e*Math.sin(a.y),-.5*this.e))-Cb,!(Math.abs(d-a.y)0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Gb&&(this.k0=.5*this.cons*dc(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/gc(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=dc(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Cb,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function oa(a){var b,c,d,e,f,g,h=a.x,i=a.y,j=Math.sin(i),k=Math.cos(i),l=fc(h-this.long0);return Math.abs(Math.abs(h-this.long0)-Math.PI)<=Gb&&Math.abs(i+this.lat0)<=Gb?(a.x=NaN,a.y=NaN,a):this.sphere?(b=2*this.k0/(1+this.sinlat0*j+this.coslat0*k*Math.cos(l)),a.x=this.a*b*k*Math.sin(l)+this.x0,a.y=this.a*b*(this.coslat0*j-this.sinlat0*k*Math.cos(l))+this.y0,a):(c=2*Math.atan(this.ssfn_(i,j,this.e))-Cb,e=Math.cos(c),d=Math.sin(c),Math.abs(this.coslat0)<=Gb?(f=gc(this.e,i*this.con,this.con*j),g=2*this.a*this.k0*f/this.cons,a.x=this.x0+g*Math.sin(h-this.long0),a.y=this.y0-this.con*g*Math.cos(h-this.long0),a):(Math.abs(this.sinlat0)0?this.long0+Math.atan2(a.x,-1*a.y):this.long0+Math.atan2(a.x,a.y):this.long0+Math.atan2(a.x*Math.sin(h),g*this.coslat0*Math.cos(h)-a.y*this.sinlat0*Math.sin(h))),a.x=b,a.y=c,a)}if(Math.abs(this.coslat0)<=Gb){if(g<=Gb)return c=this.lat0,b=this.long0,a.x=b,a.y=c,a;a.x*=this.con,a.y*=this.con,d=g*this.cons/(2*this.a*this.k0),c=this.con*hc(this.e,d),b=this.con*fc(this.con*this.long0+Math.atan2(a.x,-1*a.y))}else e=2*Math.atan(g*this.cosX0/(2*this.a*this.k0*this.ms1)),b=this.long0,g<=Gb?f=this.X0:(f=Math.asin(Math.cos(e)*this.sinX0+a.y*Math.sin(e)*this.cosX0/g),b=fc(this.long0+Math.atan2(a.x*Math.sin(e),g*this.cosX0*Math.cos(e)-a.y*this.sinX0*Math.sin(e)))),c=-1*hc(this.e,Math.tan(.5*(Cb+f)));return a.x=b,a.y=c,a}function qa(){var a=this.lat0;this.lambda0=this.long0;var b=Math.sin(a),c=this.a,d=this.rf,e=1/d,f=2*e-Math.pow(e,2),g=this.e=Math.sqrt(f);this.R=this.k0*c*Math.sqrt(1-f)/(1-f*Math.pow(b,2)),this.alpha=Math.sqrt(1+f/(1-f)*Math.pow(Math.cos(a),4)),this.b0=Math.asin(b/this.alpha);var h=Math.log(Math.tan(Math.PI/4+this.b0/2)),i=Math.log(Math.tan(Math.PI/4+a/2)),j=Math.log((1+g*b)/(1-g*b));this.K=h-this.alpha*i+this.alpha*g/2*j}function ra(a){var b=Math.log(Math.tan(Math.PI/4-a.y/2)),c=this.e/2*Math.log((1+this.e*Math.sin(a.y))/(1-this.e*Math.sin(a.y))),d=-this.alpha*(b+c)+this.K,e=2*(Math.atan(Math.exp(d))-Math.PI/4),f=this.alpha*(a.x-this.lambda0),g=Math.atan(Math.sin(f)/(Math.sin(this.b0)*Math.tan(e)+Math.cos(this.b0)*Math.cos(f))),h=Math.asin(Math.cos(this.b0)*Math.sin(e)-Math.sin(this.b0)*Math.cos(e)*Math.cos(f));return a.y=this.R/2*Math.log((1+Math.sin(h))/(1-Math.sin(h)))+this.y0,a.x=this.R*g+this.x0,a}function sa(a){for(var b=a.x-this.x0,c=a.y-this.y0,d=b/this.R,e=2*(Math.atan(Math.exp(c/this.R))-Math.PI/4),f=Math.asin(Math.cos(this.b0)*Math.sin(e)+Math.sin(this.b0)*Math.cos(e)*Math.cos(d)),g=Math.atan(Math.sin(d)/(Math.cos(this.b0)*Math.cos(d)-Math.sin(this.b0)*Math.tan(e))),h=this.lambda0+g/this.alpha,i=0,j=f,k=-1e3,l=0;Math.abs(j-k)>1e-7;){if(++l>20)return;i=1/this.alpha*(Math.log(Math.tan(Math.PI/4+f/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(j))/2)),k=j,j=2*Math.atan(Math.exp(i))-Math.PI/2}return a.x=h,a.y=j,a}function ta(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var a=Math.sin(this.lat0),b=Math.cos(this.lat0),c=this.e*a;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(b,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-c*c);var d=gc(this.e,this.lat0,a),e=this.bl/b*Math.sqrt((1-this.es)/(1-c*c));e*e<1&&(e=1);var f,g;if(isNaN(this.longc)){var h=gc(this.e,this.lat1,Math.sin(this.lat1)),i=gc(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(e+Math.sqrt(e*e-1))*Math.pow(d,this.bl):this.el=(e-Math.sqrt(e*e-1))*Math.pow(d,this.bl);var j=Math.pow(h,this.bl),k=Math.pow(i,this.bl);f=this.el/j,g=.5*(f-1/f);var l=(this.el*this.el-k*j)/(this.el*this.el+k*j),m=(k-j)/(k+j),n=fc(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(l*Math.tan(.5*this.bl*n)/m)/this.bl,this.long0=fc(this.long0);var o=fc(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*o)/g),this.alpha=Math.asin(e*Math.sin(this.gamma0))}else f=this.lat0>=0?e+Math.sqrt(e*e-1):e-Math.sqrt(e*e-1),this.el=f*Math.pow(d,this.bl),g=.5*(f-1/f),this.gamma0=Math.asin(Math.sin(this.alpha)/e),this.long0=this.longc-Math.asin(g*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(e*e-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(e*e-1),Math.cos(this.alpha))}function ua(a){var b,c,d,e=a.x,f=a.y,g=fc(e-this.long0);if(Math.abs(Math.abs(f)-Cb)<=Gb)d=f>0?-1:1,c=this.al/this.bl*Math.log(Math.tan(Jb+d*this.gamma0*.5)),b=-1*d*Cb*this.al/this.bl;else{var h=gc(this.e,f,Math.sin(f)),i=this.el/Math.pow(h,this.bl),j=.5*(i-1/i),k=.5*(i+1/i),l=Math.sin(this.bl*g),m=(j*Math.sin(this.gamma0)-l*Math.cos(this.gamma0))/k;c=Math.abs(Math.abs(m)-1)<=Gb?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-m)/(1+m))/this.bl,b=Math.abs(Math.cos(this.bl*g))<=Gb?this.al*this.bl*g:this.al*Math.atan2(j*Math.cos(this.gamma0)+l*Math.sin(this.gamma0),Math.cos(this.bl*g))/this.bl}return this.no_rot?(a.x=this.x0+b,a.y=this.y0+c):(b-=this.uc,a.x=this.x0+c*Math.cos(this.alpha)+b*Math.sin(this.alpha),a.y=this.y0+b*Math.cos(this.alpha)-c*Math.sin(this.alpha)),a}function va(a){var b,c;this.no_rot?(c=a.y-this.y0,b=a.x-this.x0):(c=(a.x-this.x0)*Math.cos(this.alpha)-(a.y-this.y0)*Math.sin(this.alpha),b=(a.y-this.y0)*Math.cos(this.alpha)+(a.x-this.x0)*Math.sin(this.alpha),b+=this.uc);var d=Math.exp(-1*this.bl*c/this.al),e=.5*(d-1/d),f=.5*(d+1/d),g=Math.sin(this.bl*b/this.al),h=(g*Math.cos(this.gamma0)+e*Math.sin(this.gamma0))/f,i=Math.pow(this.el/Math.sqrt((1+h)/(1-h)),1/this.bl);return Math.abs(h-1)Gb?this.ns=Math.log(d/h)/Math.log(e/i):this.ns=b,isNaN(this.ns)&&(this.ns=b),this.f0=d/(this.ns*Math.pow(e,this.ns)),this.rh=this.a*this.f0*Math.pow(j,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function xa(a){var b=a.x,c=a.y;Math.abs(2*Math.abs(c)-Math.PI)<=Gb&&(c=ec(c)*(Cb-2*Gb));var d,e,f=Math.abs(Math.abs(c)-Cb);if(f>Gb)d=gc(this.e,c,Math.sin(c)),e=this.a*this.f0*Math.pow(d,this.ns);else{if(f=c*this.ns,f<=0)return null;e=0}var g=this.ns*fc(b-this.long0);return a.x=this.k0*(e*Math.sin(g))+this.x0,a.y=this.k0*(this.rh-e*Math.cos(g))+this.y0,a}function ya(a){var b,c,d,e,f,g=(a.x-this.x0)/this.k0,h=this.rh-(a.y-this.y0)/this.k0;this.ns>0?(b=Math.sqrt(g*g+h*h),c=1):(b=-Math.sqrt(g*g+h*h),c=-1);var i=0;if(0!==b&&(i=Math.atan2(c*g,c*h)),0!==b||this.ns>0){if(c=1/this.ns,d=Math.pow(b/(this.a*this.f0),c),e=hc(this.e,d),e===-9999)return null}else e=-Cb;return f=fc(i/this.ns+this.long0),a.x=f,a.y=e,a}function za(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function Aa(a){var b,c,d,e,f,g,h,i=a.x,j=a.y,k=fc(i-this.long0);return b=Math.pow((1+this.e*Math.sin(j))/(1-this.e*Math.sin(j)),this.alfa*this.e/2),c=2*(Math.atan(this.k*Math.pow(Math.tan(j/2+this.s45),this.alfa)/b)-this.s45),d=-k*this.alfa,
2 | e=Math.asin(Math.cos(this.ad)*Math.sin(c)+Math.sin(this.ad)*Math.cos(c)*Math.cos(d)),f=Math.asin(Math.cos(c)*Math.sin(d)/Math.cos(e)),g=this.n*f,h=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(e/2+this.s45),this.n),a.y=h*Math.cos(g)/1,a.x=h*Math.sin(g)/1,this.czech||(a.y*=-1,a.x*=-1),a}function Ba(a){var b,c,d,e,f,g,h,i,j=a.x;a.x=a.y,a.y=j,this.czech||(a.y*=-1,a.x*=-1),g=Math.sqrt(a.x*a.x+a.y*a.y),f=Math.atan2(a.y,a.x),e=f/Math.sin(this.s0),d=2*(Math.atan(Math.pow(this.ro0/g,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),b=Math.asin(Math.cos(this.ad)*Math.sin(d)-Math.sin(this.ad)*Math.cos(d)*Math.cos(e)),c=Math.asin(Math.cos(d)*Math.sin(e)/Math.cos(b)),a.x=this.long0-c/this.alfa,h=b,i=0;var k=0;do a.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(b/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.e/2))-this.s45),Math.abs(h-a.y)<1e-10&&(i=1),h=a.y,k+=1;while(0===i&&k<15);return k>=15?null:a}function Ca(){this.sphere||(this.e0=Cd(this.es),this.e1=Dd(this.es),this.e2=Ed(this.es),this.e3=Fd(this.es),this.ml0=this.a*Bd(this.e0,this.e1,this.e2,this.e3,this.lat0))}function Da(a){var b,c,d=a.x,e=a.y;if(d=fc(d-this.long0),this.sphere)b=this.a*Math.asin(Math.cos(e)*Math.sin(d)),c=this.a*(Math.atan2(Math.tan(e),Math.cos(d))-this.lat0);else{var f=Math.sin(e),g=Math.cos(e),h=Gd(this.a,this.e,f),i=Math.tan(e)*Math.tan(e),j=d*Math.cos(e),k=j*j,l=this.es*g*g/(1-this.es),m=this.a*Bd(this.e0,this.e1,this.e2,this.e3,e);b=h*j*(1-k*i*(1/6-(8-i+8*l)*k/120)),c=m-this.ml0+h*f/g*k*(.5+(5-i+6*l)*k/24)}return a.x=b+this.x0,a.y=c+this.y0,a}function Ea(a){a.x-=this.x0,a.y-=this.y0;var b,c,d=a.x/this.a,e=a.y/this.a;if(this.sphere){var f=e+this.lat0;b=Math.asin(Math.sin(f)*Math.cos(d)),c=Math.atan2(Math.tan(d),Math.cos(f))}else{var g=this.ml0/this.a+e,h=Id(g,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(h)-Cb)<=Gb)return a.x=this.long0,a.y=Cb,e<0&&(a.y*=-1),a;var i=Gd(this.a,this.e,Math.sin(h)),j=i*i*i/this.a/this.a*(1-this.es),k=Math.pow(Math.tan(h),2),l=d*this.a/i,m=l*l;b=h-i*Math.tan(h)/j*l*l*(.5-(1+3*k)*l*l/24),c=l*(1-m*(k/3+(1+3*k)*k*m/15))/Math.cos(h)}return a.x=fc(c+this.long0),a.y=Hd(b),a}function Fa(){var a=Math.abs(this.lat0);if(Math.abs(a-Cb)0){var b;switch(this.qp=Ld(this.e,1),this.mmf=.5/(1-this.es),this.apa=Ia(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),b=Math.sin(this.lat0),this.sinb1=Ld(this.e,b)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*b*b)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function Ga(a){var b,c,d,e,f,g,h,i,j,k,l=a.x,m=a.y;if(l=fc(l-this.long0),this.sphere){if(f=Math.sin(m),k=Math.cos(m),d=Math.cos(l),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(c=this.mode===this.EQUIT?1+k*d:1+this.sinph0*f+this.cosph0*k*d,c<=Gb)return null;c=Math.sqrt(2/c),b=c*k*Math.sin(l),c*=this.mode===this.EQUIT?f:this.cosph0*f-this.sinph0*k*d}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(d=-d),Math.abs(m+this.phi0)=0?(b=(j=Math.sqrt(g))*e,c=d*(this.mode===this.S_POLE?j:-j)):b=c=0}}return a.x=this.a*b+this.x0,a.y=this.a*c+this.y0,a}function Ha(a){a.x-=this.x0,a.y-=this.y0;var b,c,d,e,f,g,h,i=a.x/this.a,j=a.y/this.a;if(this.sphere){var k,l=0,m=0;if(k=Math.sqrt(i*i+j*j),c=.5*k,c>1)return null;switch(c=2*Math.asin(c),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(m=Math.sin(c),l=Math.cos(c)),this.mode){case this.EQUIT:c=Math.abs(k)<=Gb?0:Math.asin(j*m/k),i*=m,j=l*k;break;case this.OBLIQ:c=Math.abs(k)<=Gb?this.phi0:Math.asin(l*this.sinph0+j*m*this.cosph0/k),i*=m*this.cosph0,j=(l-Math.sin(c)*this.sinph0)*k;break;case this.N_POLE:j=-j,c=Cb-c;break;case this.S_POLE:c-=Cb}b=0!==j||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(i,j):0}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(i/=this.dd,j*=this.dd,g=Math.sqrt(i*i+j*j),gGb?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function La(a){var b=a.x,c=a.y;this.sin_phi=Math.sin(c),this.cos_phi=Math.cos(c);var d=Ld(this.e3,this.sin_phi,this.cos_phi),e=this.a*Math.sqrt(this.c-this.ns0*d)/this.ns0,f=this.ns0*fc(b-this.long0),g=e*Math.sin(f)+this.x0,h=this.rh-e*Math.cos(f)+this.y0;return a.x=g,a.y=h,a}function Ma(a){var b,c,d,e,f,g;return a.x-=this.x0,a.y=this.rh-a.y+this.y0,this.ns0>=0?(b=Math.sqrt(a.x*a.x+a.y*a.y),d=1):(b=-Math.sqrt(a.x*a.x+a.y*a.y),d=-1),e=0,0!==b&&(e=Math.atan2(d*a.x,d*a.y)),d=b*this.ns0/this.a,this.sphere?g=Math.asin((this.c-d*d)/(2*this.ns0)):(c=(this.c-d*d)/this.ns0,g=this.phi1z(this.e3,c)),f=fc(e/this.ns0+this.long0),a.x=f,a.y=g,a}function Na(a,b){var c,d,e,f,g,h=Yd(.5*b);if(a0||Math.abs(g)<=Gb?(h=this.x0+this.a*f*c*Math.sin(d)/g,i=this.y0+this.a*f*(this.cos_p14*b-this.sin_p14*c*e)/g):(h=this.x0+this.infinity_dist*c*Math.sin(d),i=this.y0+this.infinity_dist*(this.cos_p14*b-this.sin_p14*c*e)),a.x=h,a.y=i,a}function Qa(a){var b,c,d,e,f,g;return a.x=(a.x-this.x0)/this.a,a.y=(a.y-this.y0)/this.a,a.x/=this.k0,a.y/=this.k0,(b=Math.sqrt(a.x*a.x+a.y*a.y))?(e=Math.atan2(b,this.rc),c=Math.sin(e),d=Math.cos(e),g=Yd(d*this.sin_p14+a.y*c*this.cos_p14/b),f=Math.atan2(a.x*c,b*this.cos_p14*d-a.y*this.sin_p14*c),f=fc(this.long0+f)):(g=this.phic0,f=0),a.x=f,a.y=g,a}function Ra(){this.sphere||(this.k0=dc(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Sa(a){var b,c,d=a.x,e=a.y,f=fc(d-this.long0);if(this.sphere)b=this.x0+this.a*f*Math.cos(this.lat_ts),c=this.y0+this.a*Math.sin(e)/Math.cos(this.lat_ts);else{var g=Ld(this.e,Math.sin(e));b=this.x0+this.a*this.k0*f,c=this.y0+this.a*g*.5/this.k0}return a.x=b,a.y=c,a}function Ta(a){a.x-=this.x0,a.y-=this.y0;var b,c;return this.sphere?(b=fc(this.long0+a.x/this.a/Math.cos(this.lat_ts)),c=Math.asin(a.y/this.a*Math.cos(this.lat_ts))):(c=be(this.e,2*a.y*this.k0/this.a),b=fc(this.long0+a.x/(this.a*this.k0))),a.x=b,a.y=c,a}function Ua(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Va(a){var b=a.x,c=a.y,d=fc(b-this.long0),e=Hd(c-this.lat0);return a.x=this.x0+this.a*d*this.rc,a.y=this.y0+this.a*e,a}function Wa(a){var b=a.x,c=a.y;return a.x=fc(this.long0+(b-this.x0)/(this.a*this.rc)),a.y=Hd(this.lat0+(c-this.y0)/this.a),a}function Xa(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Cd(this.es),this.e1=Dd(this.es),this.e2=Ed(this.es),this.e3=Fd(this.es),this.ml0=this.a*Bd(this.e0,this.e1,this.e2,this.e3,this.lat0)}function Ya(a){var b,c,d,e=a.x,f=a.y,g=fc(e-this.long0);if(d=g*Math.sin(f),this.sphere)Math.abs(f)<=Gb?(b=this.a*g,c=-1*this.a*this.lat0):(b=this.a*Math.sin(d)/Math.tan(f),c=this.a*(Hd(f-this.lat0)+(1-Math.cos(d))/Math.tan(f)));else if(Math.abs(f)<=Gb)b=this.a*g,c=-1*this.ml0;else{var h=Gd(this.a,this.e,Math.sin(f))/Math.tan(f);b=h*Math.sin(d),c=this.a*Bd(this.e0,this.e1,this.e2,this.e3,f)-this.ml0+h*(1-Math.cos(d))}return a.x=b+this.x0,a.y=c+this.y0,a}function Za(a){var b,c,d,e,f,g,h,i,j;if(d=a.x-this.x0,e=a.y-this.y0,this.sphere)if(Math.abs(e+this.a*this.lat0)<=Gb)b=fc(d/this.a+this.long0),c=0;else{g=this.lat0+e/this.a,h=d*d/this.a/this.a+g*g,i=g;var k;for(f=ge;f;--f)if(k=Math.tan(i),j=-1*(g*(i*k+1)-i-.5*(i*i+h)*k)/((i-g)/k-1),i+=j,Math.abs(j)<=Gb){c=i;break}b=fc(this.long0+Math.asin(d*Math.tan(i)/this.a)/Math.sin(c))}else if(Math.abs(e+this.ml0)<=Gb)c=0,b=fc(this.long0+d/this.a);else{g=(this.ml0+e)/this.a,h=d*d/this.a/this.a+g*g,i=g;var l,m,n,o,p;for(f=ge;f;--f)if(p=this.e*Math.sin(i),l=Math.sqrt(1-p*p)*Math.tan(i),m=this.a*Bd(this.e0,this.e1,this.e2,this.e3,i),n=this.e0-2*this.e1*Math.cos(2*i)+4*this.e2*Math.cos(4*i)-6*this.e3*Math.cos(6*i),o=m/this.a,j=(g*(l*o+1)-o-.5*l*(o*o+h))/(this.es*Math.sin(2*i)*(o*o+h-2*g*o)/(4*l)+(g-o)*(l*n-2/Math.sin(2*i))-n),i-=j,Math.abs(j)<=Gb){c=i;break}l=Math.sqrt(1-this.es*Math.pow(Math.sin(c),2))*Math.tan(c),b=fc(this.long0+Math.asin(d*l/this.a)/Math.sin(c))}return a.x=b,a.y=c,a}function $a(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function _a(a){var b,c=a.x,d=a.y,e=d-this.lat0,f=c-this.long0,g=e/Bb*1e-5,h=f,i=1,j=0;for(b=1;b<=10;b++)i*=g,j+=this.A[b]*i;var k,l,m=j,n=h,o=1,p=0,q=0,r=0;for(b=1;b<=6;b++)k=o*m-p*n,l=p*m+o*n,o=k,p=l,q=q+this.B_re[b]*o-this.B_im[b]*p,r=r+this.B_im[b]*o+this.B_re[b]*p;return a.x=r*this.a+this.x0,a.y=q*this.a+this.y0,a}function ab(a){var b,c,d,e=a.x,f=a.y,g=e-this.x0,h=f-this.y0,i=h/this.a,j=g/this.a,k=1,l=0,m=0,n=0;for(b=1;b<=6;b++)c=k*i-l*j,d=l*i+k*j,k=c,l=d,m=m+this.C_re[b]*k-this.C_im[b]*l,n=n+this.C_im[b]*k+this.C_re[b]*l;for(var o=0;o.999999999999&&(c=.999999999999),b=Math.asin(c);var d=fc(this.long0+a.x/(.900316316158*this.a*Math.cos(b)));d<-Math.PI&&(d=-Math.PI),d>Math.PI&&(d=Math.PI),c=(2*b+Math.sin(2*b))/Math.PI,Math.abs(c)>1&&(c=1);var e=Math.asin(c);return a.x=d,a.y=e,a}function kb(){Math.abs(this.lat1+this.lat2)=0?(c=Math.sqrt(a.x*a.x+a.y*a.y),b=1):(c=-Math.sqrt(a.x*a.x+a.y*a.y),b=-1);var f=0;if(0!==c&&(f=Math.atan2(b*a.x,b*a.y)),this.sphere)return e=fc(this.long0+f/this.ns),d=Hd(this.g-c/this.a),a.x=e,a.y=d,a;var g=this.g-c/this.a;return d=Id(g,this.e0,this.e1,this.e2,this.e3),e=fc(this.long0+f/this.ns),a.x=e,a.y=d,a}function nb(){this.R=this.a}function ob(a){var b,c,d=a.x,e=a.y,f=fc(d-this.long0);Math.abs(e)<=Gb&&(b=this.x0+this.R*f,c=this.y0);var g=Yd(2*Math.abs(e/Math.PI));(Math.abs(f)<=Gb||Math.abs(Math.abs(e)-Cb)<=Gb)&&(b=this.x0,c=e>=0?this.y0+Math.PI*this.R*Math.tan(.5*g):this.y0+Math.PI*this.R*-Math.tan(.5*g));var h=.5*Math.abs(Math.PI/f-f/Math.PI),i=h*h,j=Math.sin(g),k=Math.cos(g),l=k/(j+k-1),m=l*l,n=l*(2/j-1),o=n*n,p=Math.PI*this.R*(h*(l-o)+Math.sqrt(i*(l-o)*(l-o)-(o+i)*(m-o)))/(o+i);f<0&&(p=-p),b=this.x0+p;var q=i+l;return p=Math.PI*this.R*(n*q-h*Math.sqrt((o+i)*(i+1)-q*q))/(o+i),c=e>=0?this.y0+p:this.y0-p,a.x=b,a.y=c,a}function pb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;return a.x-=this.x0,a.y-=this.y0,l=Math.PI*this.R,d=a.x/l,e=a.y/l,f=d*d+e*e,g=-Math.abs(e)*(1+f),h=g-2*e*e+d*d,i=-2*g+1+2*e*e+f*f,n=e*e/i+(2*h*h*h/i/i/i-9*g*h/i/i)/27,j=(g-h*h/3/i)/i,k=2*Math.sqrt(-j/3),l=3*n/j/k,Math.abs(l)>1&&(l=l>=0?1:-1),m=Math.acos(l)/3,c=a.y>=0?(-k*Math.cos(m+Math.PI/3)-h/3/i)*Math.PI:-(-k*Math.cos(m+Math.PI/3)-h/3/i)*Math.PI,b=Math.abs(d)2*Cb*this.a)return;return c=b/this.a,d=Math.sin(c),e=Math.cos(c),f=this.long0,Math.abs(b)<=Gb?g=this.lat0:(g=Yd(e*this.sin_p12+a.y*d*this.cos_p12/b),h=Math.abs(this.lat0)-Cb,f=fc(Math.abs(h)<=Gb?this.lat0>=0?this.long0+Math.atan2(a.x,-a.y):this.long0-Math.atan2(-a.x,a.y):this.long0+Math.atan2(a.x*d,b*this.cos_p12*e-a.y*this.sin_p12*d))),a.x=f,a.y=g,a}return i=Cd(this.es),j=Dd(this.es),k=Ed(this.es),l=Fd(this.es),Math.abs(this.sin_p12-1)<=Gb?(m=this.a*Bd(i,j,k,l,Cb),b=Math.sqrt(a.x*a.x+a.y*a.y),n=m-b,g=Id(n/this.a,i,j,k,l),f=fc(this.long0+Math.atan2(a.x,-1*a.y)),a.x=f,a.y=g,a):Math.abs(this.sin_p12+1)<=Gb?(m=this.a*Bd(i,j,k,l,Cb),b=Math.sqrt(a.x*a.x+a.y*a.y),n=b-m,g=Id(n/this.a,i,j,k,l),f=fc(this.long0+Math.atan2(a.x,a.y)),a.x=f,a.y=g,a):(b=Math.sqrt(a.x*a.x+a.y*a.y),q=Math.atan2(a.x,a.y),o=Gd(this.a,this.e,this.sin_p12),r=Math.cos(q),s=this.e*this.cos_p12*r,t=-s*s/(1-this.es),u=3*this.es*(1-t)*this.sin_p12*this.cos_p12*r/(1-this.es),v=b/o,w=v-t*(1+t)*Math.pow(v,3)/6-u*(1+3*t)*Math.pow(v,4)/24,x=1-t*w*w/2-v*w*w*w/6,p=Math.asin(this.sin_p12*Math.cos(w)+this.cos_p12*Math.sin(w)*r),f=fc(this.long0+Math.asin(Math.sin(q)*Math.sin(w)/Math.cos(p))),g=Math.atan((1-this.es*x*this.sin_p12/Math.sin(p))*Math.tan(p)/(1-this.es)),a.x=f,a.y=g,a)}function tb(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function ub(a){var b,c,d,e,f,g,h,i,j=a.x,k=a.y;return d=fc(j-this.long0),b=Math.sin(k),c=Math.cos(k),e=Math.cos(d),g=this.sin_p14*b+this.cos_p14*c*e,f=1,(g>0||Math.abs(g)<=Gb)&&(h=this.a*f*c*Math.sin(d),i=this.y0+this.a*f*(this.cos_p14*b-this.sin_p14*c*e)),a.x=h,a.y=i,a}function vb(a){var b,c,d,e,f,g,h;return a.x-=this.x0,a.y-=this.y0,b=Math.sqrt(a.x*a.x+a.y*a.y),c=Yd(b/this.a),d=Math.sin(c),e=Math.cos(c),g=this.long0,Math.abs(b)<=Gb?(h=this.lat0,a.x=g,a.y=h,a):(h=Yd(e*this.sin_p14+a.y*d*this.cos_p14/b),f=Math.abs(this.lat0)-Cb,Math.abs(f)<=Gb?(g=fc(this.lat0>=0?this.long0+Math.atan2(a.x,-a.y):this.long0-Math.atan2(-a.x,a.y)),a.x=g,a.y=h,a):(g=fc(this.long0+Math.atan2(a.x*d,b*this.cos_p14*e-a.y*this.sin_p14*d)),a.x=g,a.y=h,a))}var wb=function(a){a("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),a("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),a("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),a.WGS84=a["EPSG:4326"],a["EPSG:3785"]=a["EPSG:3857"],a.GOOGLE=a["EPSG:3857"],a["EPSG:900913"]=a["EPSG:3857"],a["EPSG:102113"]=a["EPSG:3857"]},xb=1,yb=2,zb=4,Ab=5,Bb=484813681109536e-20,Cb=Math.PI/2,Db=.16666666666666666,Eb=.04722222222222222,Fb=.022156084656084655,Gb="undefined"==typeof Number.EPSILON?1e-10:Number.EPSILON,Hb=.017453292519943295,Ib=57.29577951308232,Jb=Math.PI/4,Kb=2*Math.PI,Lb=3.14159265359,Mb={};Mb.greenwich=0,Mb.lisbon=-9.131906111111,Mb.paris=2.337229166667,Mb.bogota=-74.080916666667,Mb.madrid=-3.687938888889,Mb.rome=12.452333333333,Mb.bern=7.439583333333,Mb.jakarta=106.807719444444,Mb.ferro=-17.666666666667,Mb.brussels=4.367975,Mb.stockholm=18.058277777778,Mb.athens=23.7163375,Mb.oslo=10.722916666667;var Nb={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},Ob=/[\s_\-\/\(\)]/g,Pb=function(b){var c,d,e,f={},g=b.split("+").map(function(a){return a.trim()}).filter(function(a){return a}).reduce(function(a,b){var c=b.split("=");return c.push(!0),a[c[0].toLowerCase()]=c[1],a},{}),h={proj:"projName",datum:"datumCode",rf:function(a){f.rf=parseFloat(a)},lat_0:function(a){f.lat0=a*Hb},lat_1:function(a){f.lat1=a*Hb},lat_2:function(a){f.lat2=a*Hb},lat_ts:function(a){f.lat_ts=a*Hb},lon_0:function(a){f.long0=a*Hb},lon_1:function(a){f.long1=a*Hb},lon_2:function(a){f.long2=a*Hb},alpha:function(a){f.alpha=parseFloat(a)*Hb},lonc:function(a){f.longc=a*Hb},x_0:function(a){f.x0=parseFloat(a)},y_0:function(a){f.y0=parseFloat(a)},k_0:function(a){f.k0=parseFloat(a)},k:function(a){f.k0=parseFloat(a)},a:function(a){f.a=parseFloat(a)},b:function(a){f.b=parseFloat(a)},r_a:function(){f.R_A=!0},zone:function(a){f.zone=parseInt(a,10)},south:function(){f.utmSouth=!0},towgs84:function(a){f.datum_params=a.split(",").map(function(a){return parseFloat(a)})},to_meter:function(a){f.to_meter=parseFloat(a)},units:function(b){f.units=b;var c=a(Nb,b);c&&(f.to_meter=c.to_meter)},from_greenwich:function(a){f.from_greenwich=a*Hb},pm:function(b){var c=a(Mb,b);f.from_greenwich=(c?c:parseFloat(b))*Hb},nadgrids:function(a){"@null"===a?f.datumCode="none":f.nadgrids=a},axis:function(a){var b="ewnsud";3===a.length&&b.indexOf(a.substr(0,1))!==-1&&b.indexOf(a.substr(1,1))!==-1&&b.indexOf(a.substr(2,1))!==-1&&(f.axis=a)}};for(c in g)d=g[c],c in h?(e=h[c],"function"==typeof e?e(d):f[e]=d):f[c]=d;return"string"==typeof f.datumCode&&"WGS84"!==f.datumCode&&(f.datumCode=f.datumCode.toLowerCase()),f},Qb=1,Rb=2,Sb=3,Tb=4,Ub=5,Vb=-1,Wb=/\s/,Xb=/[A-Za-z]/,Yb=/[A-Za-z84]/,Zb=/[,\]]/,$b=/[\d\.E\-\+]/;b.prototype.readCharicter=function(){var a=this.text[this.place++];if(this.state!==Tb)for(;Wb.test(a);){if(this.place>=this.text.length)return;a=this.text[this.place++]}switch(this.state){case Qb:return this.neutral(a);case Rb:return this.keyword(a);case Tb:return this.quoted(a);case Ub:return this.afterquote(a);case Sb:return this.number(a);case Vb:return}},b.prototype.afterquote=function(a){if('"'===a)return this.word+='"',void(this.state=Tb);if(Zb.test(a))return this.word=this.word.trim(),void this.afterItem(a);throw new Error("havn't handled \""+a+'" in afterquote yet, index '+this.place)},b.prototype.afterItem=function(a){return","===a?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=Qb)):"]"===a?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=Qb,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=Vb))):void 0},b.prototype.number=function(a){if($b.test(a))return void(this.word+=a);if(Zb.test(a))return this.word=parseFloat(this.word),void this.afterItem(a);throw new Error("havn't handled \""+a+'" in number yet, index '+this.place)},b.prototype.quoted=function(a){return'"'===a?void(this.state=Ub):void(this.word+=a)},b.prototype.keyword=function(a){if(Yb.test(a))return void(this.word+=a);if("["===a){var b=[];return b.push(this.word),this.level++,null===this.root?this.root=b:this.currentObject.push(b),this.stack.push(this.currentObject),this.currentObject=b,void(this.state=Qb)}if(Zb.test(a))return void this.afterItem(a);throw new Error("havn't handled \""+a+'" in keyword yet, index '+this.place)},b.prototype.neutral=function(a){if(Xb.test(a))return this.word=a,void(this.state=Rb);if('"'===a)return this.word="",void(this.state=Tb);if($b.test(a))return this.word=a,void(this.state=Sb);if(Zb.test(a))return void this.afterItem(a);throw new Error("havn't handled \""+a+'" in neutral yet, index '+this.place)},b.prototype.output=function(){for(;this.place2&&(b.z=a[2]),a.length>3&&(b.m=a[3]),b},wc=z("WGS84"),xc=6,yc="AJSAJS",zc="AFAFAF",Ac=65,Bc=73,Cc=79,Dc=86,Ec=90,Fc={forward:L,inverse:M,toPoint:N};Point.fromMGRS=function(a){return new Point(N(a))},Point.prototype.toMGRS=function(a){return L([this.x,this.y],a)};var Gc="2.4.3",Hc=1,Ic=.25,Jc=.046875,Kc=.01953125,Lc=.01068115234375,Mc=.75,Nc=.46875,Oc=.013020833333333334,Pc=.007120768229166667,Qc=.3645833333333333,Rc=.005696614583333333,Sc=.3076171875,Tc=function(a){var b=[];b[0]=Hc-a*(Ic+a*(Jc+a*(Kc+a*Lc))),b[1]=a*(Mc-a*(Jc+a*(Kc+a*Lc)));var c=a*a;return b[2]=c*(Nc-a*(Oc+a*Pc)),c*=a,b[3]=c*(Qc-a*Rc),b[4]=c*a*Sc,b},Uc=function(a,b,c,d){return c*=b,b*=b,d[0]*a-c*(d[1]+b*(d[2]+b*(d[3]+b*d[4])))},Vc=20,Wc=function(a,b,c){for(var d=1/(1-b),e=a,f=Vc;f;--f){var g=Math.sin(e),h=1-b*g*g;if(h=(Uc(e,g,Math.cos(e),c)-a)*(h*Math.sqrt(h))*d,e-=h,Math.abs(h)=0;)c=-g+d*f+a[e],g=f,f=c;return b+c*Math.sin(2*b)},cd=function(a,b){for(var c,d=2*Math.cos(b),e=a.length-1,f=a[e],g=0;--e>=0;)c=-g+d*f+a[e],g=f,f=c;return Math.sin(b)*c},dd=function(a){var b=Math.exp(a);return b=(b+1/b)/2},ed=function(a,b,c){for(var d,e,f=Math.sin(b),g=Math.cos(b),h=Zc(c),i=dd(c),j=2*g*i,k=-2*f*h,l=a.length-1,m=a[l],n=0,o=0,p=0;--l>=0;)d=o,e=n,o=m,n=p,m=-d+j*o-k*n+a[l],p=-e+k*o+j*n;return j=f*i,k=g*h,[j*m-k*p,j*p+k*m]},fd=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"],gd={init:ca,forward:da,inverse:ea,names:fd},hd=function(a,b){if(void 0===a){if(a=Math.floor(30*(fc(b)+Math.PI)/Math.PI)+1,a<0)return 0;if(a>60)return 60}return a},id="etmerc",jd=["Universal Transverse Mercator System","utm"],kd={init:fa,names:jd,dependsOn:id},ld=function(a,b){return Math.pow((1-a)/(1+a),b)},md=20,nd=["gauss"],od={init:ga,forward:ha,inverse:ia,names:nd},pd=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative"],qd={init:ja,forward:ka,inverse:la,names:pd},rd=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],sd={init:na,forward:oa,inverse:pa,names:rd,ssfn_:ma},td=["somerc"],ud={init:qa,forward:ra,inverse:sa,names:td},vd=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"],wd={init:ta,forward:ua,inverse:va,names:vd},xd=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"],yd={init:wa,forward:xa,inverse:ya,names:xd},zd=["Krovak","krovak"],Ad={init:za,forward:Aa,inverse:Ba,names:zd},Bd=function(a,b,c,d,e){return a*e-b*Math.sin(2*e)+c*Math.sin(4*e)-d*Math.sin(6*e)},Cd=function(a){return 1-.25*a*(1+a/16*(3+1.25*a))},Dd=function(a){return.375*a*(1+.25*a*(1+.46875*a))},Ed=function(a){return.05859375*a*a*(1+.75*a)},Fd=function(a){return a*a*a*(35/3072)},Gd=function(a,b,c){var d=b*c;return a/Math.sqrt(1-d*d)},Hd=function(a){return Math.abs(a)1e-7?(c=a*b,(1-a*a)*(b/(1-c*c)-.5/a*Math.log((1-c)/(1+c)))):2*b},Md=1,Nd=2,Od=3,Pd=4,Qd=.3333333333333333,Rd=.17222222222222222,Sd=.10257936507936508,Td=.06388888888888888,Ud=.0664021164021164,Vd=.016415012942191543,Wd=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],Xd={init:Fa,forward:Ga,inverse:Ha,names:Wd,S_POLE:Md,N_POLE:Nd,EQUIT:Od,OBLIQ:Pd},Yd=function(a){return Math.abs(a)>1&&(a=a>1?1:-1),Math.asin(a)},Zd=["Albers_Conic_Equal_Area","Albers","aea"],$d={init:Ka,forward:La,inverse:Ma,names:Zd,phi1z:Na},_d=["gnom"],ae={init:Oa,forward:Pa,inverse:Qa,names:_d},be=function(a,b){var c=1-(1-a*a)/(2*a)*Math.log((1-a)/(1+a));if(Math.abs(Math.abs(b)-c)<1e-6)return b<0?-1*Cb:Cb;for(var d,e,f,g,h=Math.asin(.5*b),i=0;i<30;i++)if(e=Math.sin(h),f=Math.cos(h),g=a*e,d=Math.pow(1-g*g,2)/(2*f)*(b/(1-a*a)-e/(1-g*g)+.5/a*Math.log((1-g)/(1+g))),h+=d,Math.abs(d)<=1e-10)return h;return NaN},ce=["cea"],de={init:Ra,forward:Sa,inverse:Ta,names:ce},ee=["Equirectangular","Equidistant_Cylindrical","eqc"],fe={init:Ua,forward:Va,inverse:Wa,names:ee},ge=20,he=["Polyconic","poly"],ie={init:Xa,forward:Ya,inverse:Za,names:he},je=["New_Zealand_Map_Grid","nzmg"],ke={init:$a,forward:_a,inverse:ab,names:je},le=["Miller_Cylindrical","mill"],me={init:bb,forward:cb,inverse:db,names:le},ne=20,oe=["Sinusoidal","sinu"],pe={init:eb,forward:fb,inverse:gb,names:oe},qe=["Mollweide","moll"],re={init:hb,forward:ib,inverse:jb,names:qe},se=["Equidistant_Conic","eqdc"],te={init:kb,forward:lb,inverse:mb,names:se},ue=["Van_der_Grinten_I","VanDerGrinten","vandg"],ve={init:nb,forward:ob,inverse:pb,names:ue},we=["Azimuthal_Equidistant","aeqd"],xe={init:qb,forward:rb,inverse:sb,names:we},ye=["ortho"],ze={init:tb,forward:ub,inverse:vb,names:ye},Ae=function(proj4){proj4.Proj.projections.add(Yc),proj4.Proj.projections.add(gd),proj4.Proj.projections.add(kd),proj4.Proj.projections.add(qd),proj4.Proj.projections.add(sd),proj4.Proj.projections.add(ud),proj4.Proj.projections.add(wd),proj4.Proj.projections.add(yd),proj4.Proj.projections.add(Ad),proj4.Proj.projections.add(Kd),proj4.Proj.projections.add(Xd),proj4.Proj.projections.add($d),proj4.Proj.projections.add(ae),proj4.Proj.projections.add(de),proj4.Proj.projections.add(fe),proj4.Proj.projections.add(ie),proj4.Proj.projections.add(ke),proj4.Proj.projections.add(me),proj4.Proj.projections.add(pe),proj4.Proj.projections.add(re),proj4.Proj.projections.add(te),proj4.Proj.projections.add(ve),proj4.Proj.projections.add(xe),proj4.Proj.projections.add(ze)};return K.defaultDatum="WGS84",K.Proj=z,K.WGS84=new K.Proj("WGS84"),K.Point=Point,K.toPoint=vc,K.defs=i,K.transform=H,K.mgrs=Fc,K.version=Gc,Ae(K),K});
--------------------------------------------------------------------------------