node-red-contrib-web-worldmap 2.35.0 → 2.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +5 -3
- package/node_modules/@turf/bezier-spline/package.json +39 -70
- package/node_modules/@turf/helpers/package.json +38 -82
- package/node_modules/@turf/invariant/package.json +36 -73
- package/node_modules/accepts/package.json +15 -55
- package/node_modules/array-flatten/package.json +22 -47
- package/node_modules/body-parser/HISTORY.md +6 -0
- package/node_modules/body-parser/README.md +1 -1
- package/node_modules/body-parser/index.js +8 -9
- package/node_modules/body-parser/node_modules/bytes/package.json +20 -62
- package/node_modules/body-parser/package.json +18 -57
- package/node_modules/bufferjs/package.json +17 -65
- package/node_modules/bufferlist/package.json +15 -51
- package/node_modules/call-bind/package.json +78 -106
- package/node_modules/cgi/package.json +10 -46
- package/node_modules/compressible/package.json +15 -58
- package/node_modules/compression/node_modules/bytes/package.json +20 -65
- package/node_modules/compression/package.json +10 -52
- package/node_modules/content-disposition/node_modules/safe-buffer/package.json +18 -43
- package/node_modules/content-disposition/package.json +14 -49
- package/node_modules/content-type/package.json +15 -54
- package/node_modules/cookie/package.json +14 -52
- package/node_modules/cookie-signature/package.json +8 -47
- package/node_modules/debug/package.json +21 -68
- package/node_modules/depd/package.json +13 -51
- package/node_modules/destroy/package.json +15 -50
- package/node_modules/ee-first/package.json +9 -43
- package/node_modules/encodeurl/package.json +14 -52
- package/node_modules/escape-html/package.json +12 -47
- package/node_modules/etag/package.json +15 -54
- package/node_modules/express/History.md +9 -0
- package/node_modules/express/Readme.md +2 -2
- package/node_modules/express/lib/router/route.js +8 -8
- package/node_modules/express/node_modules/safe-buffer/package.json +18 -43
- package/node_modules/express/package.json +33 -88
- package/node_modules/extend/package.json +42 -78
- package/node_modules/faye-websocket/package.json +33 -64
- package/node_modules/finalhandler/package.json +9 -44
- package/node_modules/forwarded/package.json +14 -49
- package/node_modules/fresh/package.json +17 -61
- package/node_modules/function-bind/package.json +23 -56
- package/node_modules/get-intrinsic/package.json +89 -118
- package/node_modules/has/package.json +21 -46
- package/node_modules/has-symbols/package.json +99 -124
- package/node_modules/header-stack/headers.js +33 -0
- package/node_modules/header-stack/index.js +2 -0
- package/node_modules/header-stack/package.json +14 -48
- package/node_modules/header-stack/parser.js +131 -0
- package/node_modules/header-stack/tests/dumps/multipart-folded-headers.eml +27 -0
- package/node_modules/header-stack/tests/dumps/simple-curl-get.dump +5 -0
- package/node_modules/header-stack/tests/test-empty.js +15 -0
- package/node_modules/header-stack/tests/test-multipart-folded-headers.js +21 -0
- package/node_modules/header-stack/tests/test-simple-curl-get.js +32 -0
- package/node_modules/http-errors/package.json +18 -63
- package/node_modules/iconv-lite/package.json +43 -77
- package/node_modules/inherits/package.json +12 -44
- package/node_modules/ipaddr.js/package.json +13 -48
- package/node_modules/media-typer/package.json +8 -43
- package/node_modules/merge-descriptors/package.json +10 -47
- package/node_modules/methods/package.json +17 -60
- package/node_modules/mime/package.json +13 -45
- package/node_modules/mime-db/HISTORY.md +8 -0
- package/node_modules/mime-db/LICENSE +19 -18
- package/node_modules/mime-db/README.md +1 -1
- package/node_modules/mime-db/db.json +54 -6
- package/node_modules/mime-db/index.js +1 -0
- package/node_modules/mime-db/package.json +24 -67
- package/node_modules/mime-types/HISTORY.md +9 -0
- package/node_modules/mime-types/README.md +1 -1
- package/node_modules/mime-types/package.json +19 -63
- package/node_modules/ms/package.json +19 -54
- package/node_modules/negotiator/package.json +19 -61
- package/node_modules/object-inspect/package.json +48 -76
- package/node_modules/on-finished/package.json +8 -50
- package/node_modules/on-headers/package.json +14 -52
- package/node_modules/parseurl/package.json +10 -54
- package/node_modules/path-to-regexp/package.json +15 -44
- package/node_modules/proxy-addr/package.json +14 -49
- package/node_modules/qs/.editorconfig +3 -0
- package/node_modules/qs/.eslintrc +5 -5
- package/node_modules/qs/CHANGELOG.md +158 -0
- package/node_modules/qs/README.md +3 -1
- package/node_modules/qs/dist/qs.js +19 -9
- package/node_modules/qs/lib/stringify.js +12 -3
- package/node_modules/qs/package.json +73 -98
- package/node_modules/qs/test/parse.js +14 -0
- package/node_modules/qs/test/stringify.js +54 -10
- package/node_modules/range-parser/package.json +18 -68
- package/node_modules/raw-body/node_modules/bytes/package.json +20 -62
- package/node_modules/raw-body/package.json +9 -51
- package/node_modules/safe-buffer/package.json +5 -36
- package/node_modules/safer-buffer/package.json +13 -42
- package/node_modules/send/node_modules/ms/package.json +20 -52
- package/node_modules/send/package.json +17 -62
- package/node_modules/serve-static/package.json +9 -44
- package/node_modules/setprototypeof/package.json +27 -55
- package/node_modules/side-channel/package.json +65 -93
- package/node_modules/sockjs/package.json +43 -70
- package/node_modules/statuses/package.json +19 -61
- package/node_modules/stream-stack/package.json +11 -43
- package/node_modules/toidentifier/package.json +9 -51
- package/node_modules/type-is/package.json +12 -55
- package/node_modules/unpipe/package.json +8 -45
- package/node_modules/utils-merge/package.json +19 -45
- package/node_modules/uuid/package.json +70 -99
- package/node_modules/vary/package.json +13 -52
- package/node_modules/websocket-driver/node_modules/http-parser-js/package.json +18 -65
- package/node_modules/websocket-driver/package.json +33 -68
- package/node_modules/websocket-extensions/package.json +27 -61
- package/package.json +1 -1
- package/worldmap/worldmap.js +95 -11
|
@@ -1,41 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
[
|
|
4
|
-
"vary@1.1.2",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
|
-
"_from": "vary@1.1.2",
|
|
9
|
-
"_id": "vary@1.1.2",
|
|
10
|
-
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
|
|
12
|
-
"_location": "/vary",
|
|
13
|
-
"_phantomChildren": {},
|
|
14
|
-
"_requested": {
|
|
15
|
-
"type": "version",
|
|
16
|
-
"registry": true,
|
|
17
|
-
"raw": "vary@1.1.2",
|
|
18
|
-
"name": "vary",
|
|
19
|
-
"escapedName": "vary",
|
|
20
|
-
"rawSpec": "1.1.2",
|
|
21
|
-
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "1.1.2"
|
|
23
|
-
},
|
|
24
|
-
"_requiredBy": [
|
|
25
|
-
"/compression",
|
|
26
|
-
"/express"
|
|
27
|
-
],
|
|
28
|
-
"_resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
|
29
|
-
"_spec": "1.1.2",
|
|
30
|
-
"_where": "/Users/conway/Projects/worldmap",
|
|
31
|
-
"author": {
|
|
32
|
-
"name": "Douglas Christopher Wilson",
|
|
33
|
-
"email": "doug@somethingdoug.com"
|
|
34
|
-
},
|
|
35
|
-
"bugs": {
|
|
36
|
-
"url": "https://github.com/jshttp/vary/issues"
|
|
37
|
-
},
|
|
2
|
+
"name": "vary",
|
|
38
3
|
"description": "Manipulate the HTTP Vary header",
|
|
4
|
+
"version": "1.1.2",
|
|
5
|
+
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"http",
|
|
9
|
+
"res",
|
|
10
|
+
"vary"
|
|
11
|
+
],
|
|
12
|
+
"repository": "jshttp/vary",
|
|
39
13
|
"devDependencies": {
|
|
40
14
|
"beautify-benchmark": "0.2.4",
|
|
41
15
|
"benchmark": "2.1.4",
|
|
@@ -50,26 +24,14 @@
|
|
|
50
24
|
"mocha": "2.5.3",
|
|
51
25
|
"supertest": "1.1.0"
|
|
52
26
|
},
|
|
53
|
-
"engines": {
|
|
54
|
-
"node": ">= 0.8"
|
|
55
|
-
},
|
|
56
27
|
"files": [
|
|
57
28
|
"HISTORY.md",
|
|
58
29
|
"LICENSE",
|
|
59
30
|
"README.md",
|
|
60
31
|
"index.js"
|
|
61
32
|
],
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
"http",
|
|
65
|
-
"res",
|
|
66
|
-
"vary"
|
|
67
|
-
],
|
|
68
|
-
"license": "MIT",
|
|
69
|
-
"name": "vary",
|
|
70
|
-
"repository": {
|
|
71
|
-
"type": "git",
|
|
72
|
-
"url": "git+https://github.com/jshttp/vary.git"
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">= 0.8"
|
|
73
35
|
},
|
|
74
36
|
"scripts": {
|
|
75
37
|
"bench": "node benchmark/index.js",
|
|
@@ -77,6 +39,5 @@
|
|
|
77
39
|
"test": "mocha --reporter spec --bail --check-leaks test/",
|
|
78
40
|
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
|
|
79
41
|
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
|
|
80
|
-
}
|
|
81
|
-
"version": "1.1.2"
|
|
42
|
+
}
|
|
82
43
|
}
|
|
@@ -1,75 +1,28 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"_id": "http-parser-js@0.5.2",
|
|
10
|
-
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha512-opCO9ASqg5Wy2FNo7A0sxy71yGbbkJJXLdgMK04Tcypw9jr2MgWbyubb0+WdmDmGnFflO7fRbqbaihh/ENDlRQ==",
|
|
12
|
-
"_location": "/node-red-contrib-web-worldmap/websocket-driver/http-parser-js",
|
|
13
|
-
"_phantomChildren": {},
|
|
14
|
-
"_requested": {
|
|
15
|
-
"type": "version",
|
|
16
|
-
"registry": true,
|
|
17
|
-
"raw": "http-parser-js@0.5.2",
|
|
18
|
-
"name": "http-parser-js",
|
|
19
|
-
"escapedName": "http-parser-js",
|
|
20
|
-
"rawSpec": "0.5.2",
|
|
21
|
-
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "0.5.2"
|
|
23
|
-
},
|
|
24
|
-
"_requiredBy": [
|
|
25
|
-
"/node-red-contrib-web-worldmap/websocket-driver"
|
|
26
|
-
],
|
|
27
|
-
"_resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.2.tgz",
|
|
28
|
-
"_spec": "0.5.2",
|
|
29
|
-
"_where": "/Users/conway/.node-red",
|
|
30
|
-
"author": {
|
|
31
|
-
"name": "Tim Caswell",
|
|
32
|
-
"url": "https://github.com/creationix"
|
|
2
|
+
"name": "http-parser-js",
|
|
3
|
+
"version": "0.5.2",
|
|
4
|
+
"description": "A pure JS HTTP parser for node.",
|
|
5
|
+
"main": "http-parser.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "python tests/test.py && node tests/iojs/test-http-parser-durability.js",
|
|
8
|
+
"testv12": "python tests/test.py --node-args=\"--http-parser=legacy\" && node --http-parser=legacy tests/iojs/test-http-parser-durability.js"
|
|
33
9
|
},
|
|
34
|
-
"
|
|
35
|
-
"
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git://github.com/creationix/http-parser-js.git"
|
|
36
13
|
},
|
|
37
|
-
"contributors": [
|
|
38
|
-
{
|
|
39
|
-
"name": "Jimb Esser",
|
|
40
|
-
"url": "https://github.com/Jimbly"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "Lawrence Rowe",
|
|
44
|
-
"url": "https://github.com/lrowe"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"name": "Jan Schär",
|
|
48
|
-
"url": "https://github.com/jscissr"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"name": "Paul Rütter",
|
|
52
|
-
"url": "https://github.com/paulrutter"
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
"description": "A pure JS HTTP parser for node.",
|
|
56
14
|
"files": [
|
|
57
15
|
"http-parser.js"
|
|
58
16
|
],
|
|
59
|
-
"homepage": "https://github.com/creationix/http-parser-js#readme",
|
|
60
17
|
"keywords": [
|
|
61
18
|
"http"
|
|
62
19
|
],
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
"test": "python tests/test.py && node tests/iojs/test-http-parser-durability.js",
|
|
72
|
-
"testv12": "python tests/test.py --node-args=\"--http-parser=legacy\" && node --http-parser=legacy tests/iojs/test-http-parser-durability.js"
|
|
73
|
-
},
|
|
74
|
-
"version": "0.5.2"
|
|
20
|
+
"author": "Tim Caswell (https://github.com/creationix)",
|
|
21
|
+
"contributors": [
|
|
22
|
+
"Jimb Esser (https://github.com/Jimbly)",
|
|
23
|
+
"Lawrence Rowe (https://github.com/lrowe)",
|
|
24
|
+
"Jan Schär (https://github.com/jscissr)",
|
|
25
|
+
"Paul Rütter (https://github.com/paulrutter)"
|
|
26
|
+
],
|
|
27
|
+
"license": "MIT"
|
|
75
28
|
}
|
|
@@ -1,70 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
"bugs": {
|
|
37
|
-
"url": "https://github.com/faye/websocket-driver-node/issues"
|
|
38
|
-
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"http-parser-js": ">=0.5.1",
|
|
41
|
-
"safe-buffer": ">=5.1.0",
|
|
42
|
-
"websocket-extensions": ">=0.1.1"
|
|
43
|
-
},
|
|
44
|
-
"description": "WebSocket protocol handler with pluggable I/O",
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"jstest": "*",
|
|
47
|
-
"permessage-deflate": "*"
|
|
48
|
-
},
|
|
49
|
-
"engines": {
|
|
50
|
-
"node": ">=0.8.0"
|
|
51
|
-
},
|
|
52
|
-
"files": [
|
|
53
|
-
"lib"
|
|
54
|
-
],
|
|
55
|
-
"homepage": "https://github.com/faye/websocket-driver-node",
|
|
56
|
-
"keywords": [
|
|
57
|
-
"websocket"
|
|
58
|
-
],
|
|
59
|
-
"license": "Apache-2.0",
|
|
60
|
-
"main": "./lib/websocket/driver",
|
|
61
|
-
"name": "websocket-driver",
|
|
62
|
-
"repository": {
|
|
63
|
-
"type": "git",
|
|
64
|
-
"url": "git://github.com/faye/websocket-driver-node.git"
|
|
65
|
-
},
|
|
66
|
-
"scripts": {
|
|
67
|
-
"test": "jstest spec/runner.js"
|
|
68
|
-
},
|
|
69
|
-
"version": "0.7.4"
|
|
2
|
+
"name": "websocket-driver",
|
|
3
|
+
"description": "WebSocket protocol handler with pluggable I/O",
|
|
4
|
+
"homepage": "https://github.com/faye/websocket-driver-node",
|
|
5
|
+
"author": "James Coglan <jcoglan@gmail.com> (http://jcoglan.com/)",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"websocket"
|
|
8
|
+
],
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"version": "0.7.4",
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=0.8.0"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"lib"
|
|
16
|
+
],
|
|
17
|
+
"main": "./lib/websocket/driver",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"http-parser-js": ">=0.5.1",
|
|
20
|
+
"safe-buffer": ">=5.1.0",
|
|
21
|
+
"websocket-extensions": ">=0.1.1"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"jstest": "*",
|
|
25
|
+
"permessage-deflate": "*"
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"test": "jstest spec/runner.js"
|
|
29
|
+
},
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git://github.com/faye/websocket-driver-node.git"
|
|
33
|
+
},
|
|
34
|
+
"bugs": "https://github.com/faye/websocket-driver-node/issues"
|
|
70
35
|
}
|
|
@@ -1,63 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"_where": "/Users/conway/Projects/worldmap",
|
|
30
|
-
"author": {
|
|
31
|
-
"name": "James Coglan",
|
|
32
|
-
"email": "jcoglan@gmail.com",
|
|
33
|
-
"url": "http://jcoglan.com/"
|
|
34
|
-
},
|
|
35
|
-
"bugs": {
|
|
36
|
-
"url": "http://github.com/faye/websocket-extensions-node/issues"
|
|
37
|
-
},
|
|
38
|
-
"description": "Generic extension manager for WebSocket connections",
|
|
39
|
-
"devDependencies": {
|
|
40
|
-
"jstest": "*"
|
|
41
|
-
},
|
|
42
|
-
"engines": {
|
|
43
|
-
"node": ">=0.8.0"
|
|
44
|
-
},
|
|
45
|
-
"files": [
|
|
46
|
-
"lib"
|
|
47
|
-
],
|
|
48
|
-
"homepage": "http://github.com/faye/websocket-extensions-node",
|
|
49
|
-
"keywords": [
|
|
50
|
-
"websocket"
|
|
51
|
-
],
|
|
52
|
-
"license": "Apache-2.0",
|
|
53
|
-
"main": "./lib/websocket_extensions",
|
|
54
|
-
"name": "websocket-extensions",
|
|
55
|
-
"repository": {
|
|
56
|
-
"type": "git",
|
|
57
|
-
"url": "git://github.com/faye/websocket-extensions-node.git"
|
|
58
|
-
},
|
|
59
|
-
"scripts": {
|
|
60
|
-
"test": "jstest spec/runner.js"
|
|
61
|
-
},
|
|
62
|
-
"version": "0.1.4"
|
|
2
|
+
"name": "websocket-extensions",
|
|
3
|
+
"description": "Generic extension manager for WebSocket connections",
|
|
4
|
+
"homepage": "http://github.com/faye/websocket-extensions-node",
|
|
5
|
+
"author": "James Coglan <jcoglan@gmail.com> (http://jcoglan.com/)",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"websocket"
|
|
8
|
+
],
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"version": "0.1.4",
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=0.8.0"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"lib"
|
|
16
|
+
],
|
|
17
|
+
"main": "./lib/websocket_extensions",
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"jstest": "*"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"test": "jstest spec/runner.js"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git://github.com/faye/websocket-extensions-node.git"
|
|
27
|
+
},
|
|
28
|
+
"bugs": "http://github.com/faye/websocket-extensions-node/issues"
|
|
63
29
|
}
|
package/package.json
CHANGED
package/worldmap/worldmap.js
CHANGED
|
@@ -33,7 +33,9 @@ var drawingColour = "#910000";
|
|
|
33
33
|
var sendDrawing;
|
|
34
34
|
var colorControl;
|
|
35
35
|
var sendRoute;
|
|
36
|
-
var oldBounds = {ne:{lat:0,lng:0},sw:{lat:0,lng:0}};
|
|
36
|
+
var oldBounds = {ne:{lat:0, lng:0}, sw:{lat:0, lng:0}};
|
|
37
|
+
var edgeLayer = new L.layerGroup();
|
|
38
|
+
var edgeEnabled = true;
|
|
37
39
|
|
|
38
40
|
var iconSz = {
|
|
39
41
|
"Team/Crew": 24,
|
|
@@ -371,6 +373,69 @@ var Lgrid = L.latlngGraticule({
|
|
|
371
373
|
]
|
|
372
374
|
});
|
|
373
375
|
|
|
376
|
+
// Add small sidc icons around edge of map for things just outside of view
|
|
377
|
+
// This function based heavily on Game Aware code from Måns Beckman
|
|
378
|
+
// Copyright (c) 2013 Måns Beckman, All rights reserved.
|
|
379
|
+
var edgeAware = function() {
|
|
380
|
+
if (!edgeEnabled) { return; }
|
|
381
|
+
map.removeLayer(edgeLayer)
|
|
382
|
+
edgeLayer = new L.layerGroup();
|
|
383
|
+
var mapBounds = map.getBounds();
|
|
384
|
+
var mapBoundsCenter = mapBounds.getCenter();
|
|
385
|
+
|
|
386
|
+
pSW = map.options.crs.latLngToPoint(mapBounds.getSouthWest(), map.getZoom());
|
|
387
|
+
pNE = map.options.crs.latLngToPoint(mapBounds.getNorthEast(), map.getZoom());
|
|
388
|
+
pCenter = map.options.crs.latLngToPoint(mapBoundsCenter, map.getZoom());
|
|
389
|
+
|
|
390
|
+
var viewBounds = L.latLngBounds(map.options.crs.pointToLatLng(L.point(pSW.x - (pCenter.x - pSW.x ), pSW.y - (pCenter.y - pSW.y )), map.getZoom()) , map.options.crs.pointToLatLng(L.point(pNE.x + (pNE.x - pCenter.x) , pNE.y + (pNE.y - pCenter.y) ), map.getZoom()) );
|
|
391
|
+
for (var id in markers) {
|
|
392
|
+
if (allData[id].hasOwnProperty("SIDC")) {
|
|
393
|
+
markerLatLng = markers[id].getLatLng();
|
|
394
|
+
if ( viewBounds.contains(markerLatLng) && !mapBounds.contains(markerLatLng) ) {
|
|
395
|
+
var k = (markerLatLng.lat - mapBoundsCenter.lat) / (markerLatLng.lng - mapBoundsCenter.lng);
|
|
396
|
+
|
|
397
|
+
if (markerLatLng.lng > mapBoundsCenter.lng) { x = mapBounds.getEast() - mapBoundsCenter.lng; }
|
|
398
|
+
else { x = (mapBounds.getWest() - mapBoundsCenter.lng); }
|
|
399
|
+
|
|
400
|
+
if (markerLatLng.lat < mapBoundsCenter.lat) { y = mapBounds.getSouth() - mapBoundsCenter.lat; }
|
|
401
|
+
else { y = mapBounds.getNorth() - mapBoundsCenter.lat; }
|
|
402
|
+
|
|
403
|
+
var lat = (mapBoundsCenter.lat + (k * x));
|
|
404
|
+
var lng = (mapBoundsCenter.lng + (y / k));
|
|
405
|
+
var iconAnchor = {x:5, y:5}
|
|
406
|
+
|
|
407
|
+
if (lng > mapBounds.getEast()) {
|
|
408
|
+
lng = mapBounds.getEast();
|
|
409
|
+
iconAnchor.x = 20;
|
|
410
|
+
}
|
|
411
|
+
if (lng < mapBounds.getWest()) {
|
|
412
|
+
lng = mapBounds.getWest();
|
|
413
|
+
iconAnchor.x = -5;
|
|
414
|
+
};
|
|
415
|
+
if (lat < mapBounds.getSouth()) {
|
|
416
|
+
lat = mapBounds.getSouth();
|
|
417
|
+
iconAnchor.y = 15;
|
|
418
|
+
}
|
|
419
|
+
if (lat > mapBounds.getNorth()) {
|
|
420
|
+
lat = mapBounds.getNorth();
|
|
421
|
+
iconAnchor.y = -5;
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
var eico = new ms.Symbol(allData[id].SIDC.substr(0,5)+"-------",{size:9});
|
|
425
|
+
var myicon = L.icon({
|
|
426
|
+
iconUrl: eico.toDataURL(),
|
|
427
|
+
iconAnchor: new L.Point(iconAnchor.x, iconAnchor.y),
|
|
428
|
+
className: "natoicon-s",
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
edgeLayer.addLayer(L.marker([lat,lng],{icon:myicon}))
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
edgeLayer.addTo(map)
|
|
436
|
+
}
|
|
437
|
+
// end of edge function
|
|
438
|
+
|
|
374
439
|
var panit = false;
|
|
375
440
|
function doPanit(v) {
|
|
376
441
|
if (v !== undefined) { panit = v; }
|
|
@@ -672,6 +737,7 @@ map.on('zoomend', function() {
|
|
|
672
737
|
var b = map.getBounds();
|
|
673
738
|
oldBounds = {sw:{lat:b._southWest.lat,lng:b._southWest.lng},ne:{lat:b._northEast.lat,lng:b._northEast.lng}};
|
|
674
739
|
ws.send(JSON.stringify({action:"bounds", south:b._southWest.lat, west:b._southWest.lng, north:b._northEast.lat, east:b._northEast.lng, zoom:map.getZoom() }));
|
|
740
|
+
edgeAware();
|
|
675
741
|
});
|
|
676
742
|
map.on('moveend', function() {
|
|
677
743
|
window.localStorage.setItem("lastpos",JSON.stringify(map.getCenter()));
|
|
@@ -680,6 +746,7 @@ map.on('moveend', function() {
|
|
|
680
746
|
ws.send(JSON.stringify({action:"bounds", south:b._southWest.lat, west:b._southWest.lng, north:b._northEast.lat, east:b._northEast.lng, zoom:map.getZoom() }));
|
|
681
747
|
oldBounds = {sw:{lat:b._southWest.lat,lng:b._southWest.lng},ne:{lat:b._northEast.lat,lng:b._northEast.lng}};
|
|
682
748
|
}
|
|
749
|
+
edgeAware();
|
|
683
750
|
});
|
|
684
751
|
map.on('locationfound', onLocationFound);
|
|
685
752
|
map.on('locationerror', onLocationError);
|
|
@@ -1468,7 +1535,9 @@ function setMarker(data) {
|
|
|
1468
1535
|
if (!data.hasOwnProperty("opacity")) { opt.opacity = 0.8; }
|
|
1469
1536
|
var polyln = L.polyline(data.line, opt);
|
|
1470
1537
|
polygons[data.name] = rightmenu(polyln);
|
|
1471
|
-
if (data.hasOwnProperty("
|
|
1538
|
+
if (data.hasOwnProperty("fly") && data.fly === true) {
|
|
1539
|
+
map.flyToBounds(polygons[data.name].getBounds(),{padding:[50,50]})
|
|
1540
|
+
} else if (data.hasOwnProperty("fit") && data.fit === true) {
|
|
1472
1541
|
map.fitBounds(polygons[data.name].getBounds(),{padding:[50,50]})
|
|
1473
1542
|
}
|
|
1474
1543
|
}
|
|
@@ -1477,7 +1546,9 @@ function setMarker(data) {
|
|
|
1477
1546
|
if (data.area.length === 2) { polyarea = L.rectangle(data.area, opt); }
|
|
1478
1547
|
else { polyarea = L.polygon(data.area, opt); }
|
|
1479
1548
|
polygons[data.name] = rightmenu(polyarea);
|
|
1480
|
-
if (data.hasOwnProperty("
|
|
1549
|
+
if (data.hasOwnProperty("fly") && data.fly === true) {
|
|
1550
|
+
map.flyToBounds(polygons[data.name].getBounds(),{padding:[50,50]})
|
|
1551
|
+
} else if (data.hasOwnProperty("fit") && data.fit === true) {
|
|
1481
1552
|
map.fitBounds(polygons[data.name].getBounds(),{padding:[50,50]})
|
|
1482
1553
|
}
|
|
1483
1554
|
}
|
|
@@ -1490,7 +1561,9 @@ function setMarker(data) {
|
|
|
1490
1561
|
var aml = new L.Wrapped.Polyline(greatc._latlngs, opt);
|
|
1491
1562
|
|
|
1492
1563
|
polygons[data.name] = rightmenu(aml);
|
|
1493
|
-
if (data.hasOwnProperty("
|
|
1564
|
+
if (data.hasOwnProperty("fly") && data.fly === true) {
|
|
1565
|
+
map.flyToBounds(polygons[data.name].getBounds(),{padding:[50,50]})
|
|
1566
|
+
} else if (data.hasOwnProperty("fit") && data.fit === true) {
|
|
1494
1567
|
map.fitBounds(polygons[data.name].getBounds(),{padding:[50,50]})
|
|
1495
1568
|
}
|
|
1496
1569
|
}
|
|
@@ -1871,6 +1944,7 @@ function setMarker(data) {
|
|
|
1871
1944
|
className: "natoicon",
|
|
1872
1945
|
});
|
|
1873
1946
|
marker = L.marker(ll, { title:data.name, icon:myicon, draggable:drag });
|
|
1947
|
+
edgeAware();
|
|
1874
1948
|
}
|
|
1875
1949
|
else {
|
|
1876
1950
|
myMarker = L.VectorMarkers.icon({
|
|
@@ -2389,7 +2463,8 @@ function doCommand(cmd) {
|
|
|
2389
2463
|
if (!cmd.map.hasOwnProperty("visible") || (cmd.map.visible != false)) {
|
|
2390
2464
|
map.addLayer(overlays[cmd.map.overlay]);
|
|
2391
2465
|
}
|
|
2392
|
-
if (cmd.map.hasOwnProperty("
|
|
2466
|
+
if (cmd.map.hasOwnProperty("fly") && (cmd.map.fly === true)) { map.flyToBounds(overlays[cmd.map.overlay].getBounds()); }
|
|
2467
|
+
else if (cmd.map.hasOwnProperty("fit") && (cmd.map.fit === true)) { map.fitBounds(overlays[cmd.map.overlay].getBounds()); }
|
|
2393
2468
|
}
|
|
2394
2469
|
// Add a new NVG XML overlay layer
|
|
2395
2470
|
if (cmd.map && cmd.map.hasOwnProperty("overlay") && cmd.map.hasOwnProperty("nvg") ) {
|
|
@@ -2460,7 +2535,8 @@ function doCommand(cmd) {
|
|
|
2460
2535
|
if (!cmd.map.hasOwnProperty("visible") || (cmd.map.visible != false)) {
|
|
2461
2536
|
map.addLayer(overlays[cmd.map.overlay]);
|
|
2462
2537
|
}
|
|
2463
|
-
if (cmd.map.hasOwnProperty("
|
|
2538
|
+
if (cmd.map.hasOwnProperty("fly") && cmd.map.fly === true) { map.flyToBounds(overlays[cmd.map.overlay].getBounds()); }
|
|
2539
|
+
else if (cmd.map.hasOwnProperty("fit") && cmd.map.fit === true) { map.fitBounds(overlays[cmd.map.overlay].getBounds()); }
|
|
2464
2540
|
}
|
|
2465
2541
|
|
|
2466
2542
|
var custIco = function() {
|
|
@@ -2510,7 +2586,8 @@ function doCommand(cmd) {
|
|
|
2510
2586
|
if (!cmd.map.hasOwnProperty("visible") || (cmd.map.visible != false)) {
|
|
2511
2587
|
overlays[cmd.map.overlay].addTo(map);
|
|
2512
2588
|
}
|
|
2513
|
-
if (cmd.map.hasOwnProperty("
|
|
2589
|
+
if (cmd.map.hasOwnProperty("fly") && cmd.map.fly === true) { map.flyToBounds(overlays[cmd.map.overlay].getBounds()); }
|
|
2590
|
+
else if (cmd.map.hasOwnProperty("fit") && cmd.map.fit === true) { map.fitBounds(overlays[cmd.map.overlay].getBounds()); }
|
|
2514
2591
|
}
|
|
2515
2592
|
// Add a new TOPOJSON overlay layer
|
|
2516
2593
|
if (cmd.map && cmd.map.hasOwnProperty("overlay") && cmd.map.hasOwnProperty("topojson") ) {
|
|
@@ -2525,7 +2602,8 @@ function doCommand(cmd) {
|
|
|
2525
2602
|
if (!cmd.map.hasOwnProperty("visible") || (cmd.map.visible != false)) {
|
|
2526
2603
|
overlays[cmd.map.overlay].addTo(map);
|
|
2527
2604
|
}
|
|
2528
|
-
if (cmd.map.hasOwnProperty("
|
|
2605
|
+
if (cmd.map.hasOwnProperty("fly") && cmd.map.fly === true) { map.flyToBounds(overlays[cmd.map.overlay].getBounds()); }
|
|
2606
|
+
else if (cmd.map.hasOwnProperty("fit") && cmd.map.fit === true) { map.fitBounds(overlays[cmd.map.overlay].getBounds()); }
|
|
2529
2607
|
}
|
|
2530
2608
|
// Add a new GPX overlay layer
|
|
2531
2609
|
if (cmd.map && cmd.map.hasOwnProperty("overlay") && cmd.map.hasOwnProperty("gpx") ) {
|
|
@@ -2540,7 +2618,8 @@ function doCommand(cmd) {
|
|
|
2540
2618
|
if (!cmd.map.hasOwnProperty("visible") || (cmd.map.visible != false)) {
|
|
2541
2619
|
overlays[cmd.map.overlay].addTo(map);
|
|
2542
2620
|
}
|
|
2543
|
-
if (cmd.map.hasOwnProperty("
|
|
2621
|
+
if (cmd.map.hasOwnProperty("fly") && cmd.map.fly === true) { map.flyToBounds(overlays[cmd.map.overlay].getBounds()); }
|
|
2622
|
+
else if (cmd.map.hasOwnProperty("fit") && cmd.map.fit === true) { map.fitBounds(overlays[cmd.map.overlay].getBounds()); }
|
|
2544
2623
|
}
|
|
2545
2624
|
// Add a new velocity overlay layer
|
|
2546
2625
|
if (cmd.map && cmd.map.hasOwnProperty("overlay") && cmd.map.hasOwnProperty("velocity") ) {
|
|
@@ -2553,7 +2632,8 @@ function doCommand(cmd) {
|
|
|
2553
2632
|
if (!cmd.map.hasOwnProperty("visible") || (cmd.map.visible != false)) {
|
|
2554
2633
|
overlays[cmd.map.overlay].addTo(map);
|
|
2555
2634
|
}
|
|
2556
|
-
if (cmd.map.hasOwnProperty("
|
|
2635
|
+
if (cmd.map.hasOwnProperty("fly") && cmd.map.fly === true) { map.flyToBounds(overlays[cmd.map.overlay].getBounds()); }
|
|
2636
|
+
else if (cmd.map.hasOwnProperty("fit") && cmd.map.fit === true) { map.fitBounds(overlays[cmd.map.overlay].getBounds()); }
|
|
2557
2637
|
}
|
|
2558
2638
|
// Add a new overlay layer
|
|
2559
2639
|
if (cmd.map && cmd.map.hasOwnProperty("overlay") && cmd.map.hasOwnProperty("url") && cmd.map.hasOwnProperty("opt")) {
|
|
@@ -2699,7 +2779,11 @@ function doCommand(cmd) {
|
|
|
2699
2779
|
}
|
|
2700
2780
|
if (cmd.hasOwnProperty("bounds")) { // Move/Zoom map to new bounds
|
|
2701
2781
|
if (cmd.bounds.length === 2 && cmd.bounds[0].length === 2 && cmd.bounds[1].length === 2) {
|
|
2702
|
-
|
|
2782
|
+
if (cmd.hasOwnProperty("fly") && cmd.fly === true) {
|
|
2783
|
+
map.flyToBounds(cmd.bounds);
|
|
2784
|
+
} else {
|
|
2785
|
+
map.fitBounds(cmd.bounds);
|
|
2786
|
+
}
|
|
2703
2787
|
}
|
|
2704
2788
|
}
|
|
2705
2789
|
}
|