node-red-contrib-web-worldmap 2.23.3 → 2.24.1
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 +29 -1
- package/README.md +16 -24
- package/node_modules/body-parser/HISTORY.md +15 -0
- package/node_modules/body-parser/README.md +25 -12
- package/node_modules/body-parser/node_modules/bytes/package.json +4 -4
- package/node_modules/body-parser/package.json +34 -37
- package/node_modules/content-disposition/HISTORY.md +5 -0
- package/node_modules/content-disposition/README.md +3 -9
- package/node_modules/content-disposition/index.js +1 -1
- package/node_modules/content-disposition/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/content-disposition/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/content-disposition/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/content-disposition/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/content-disposition/node_modules/safe-buffer/package.json +76 -0
- package/node_modules/content-disposition/package.json +27 -30
- package/node_modules/cookie/HISTORY.md +5 -0
- package/node_modules/cookie/README.md +4 -0
- package/node_modules/cookie/index.js +5 -1
- package/node_modules/cookie/package.json +22 -25
- package/node_modules/express/History.md +33 -0
- package/node_modules/express/Readme.md +8 -5
- package/node_modules/express/lib/application.js +1 -1
- package/node_modules/express/lib/request.js +1 -1
- package/node_modules/express/lib/response.js +16 -11
- package/node_modules/express/lib/router/index.js +6 -0
- package/node_modules/express/lib/utils.js +2 -6
- package/node_modules/express/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/express/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/express/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/express/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/express/node_modules/safe-buffer/package.json +76 -0
- package/node_modules/express/package.json +37 -39
- package/node_modules/faye-websocket/CHANGELOG.md +5 -0
- package/node_modules/faye-websocket/LICENSE.md +1 -1
- package/node_modules/faye-websocket/README.md +13 -13
- package/node_modules/faye-websocket/lib/faye/websocket/api.js +10 -8
- package/node_modules/faye-websocket/lib/faye/websocket/client.js +4 -4
- package/node_modules/faye-websocket/lib/faye/websocket.js +1 -1
- package/node_modules/faye-websocket/package.json +16 -19
- package/node_modules/forwarded/HISTORY.md +5 -0
- package/node_modules/forwarded/README.md +3 -3
- package/node_modules/forwarded/index.js +15 -1
- package/node_modules/forwarded/package.json +27 -28
- package/node_modules/http-errors/HISTORY.md +16 -0
- package/node_modules/http-errors/README.md +12 -6
- package/node_modules/http-errors/index.js +35 -2
- package/node_modules/http-errors/package.json +32 -35
- package/node_modules/inherits/inherits.js +2 -0
- package/node_modules/inherits/inherits_browser.js +18 -14
- package/node_modules/inherits/package.json +17 -20
- package/node_modules/ipaddr.js/README.md +1 -1
- package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +6 -9
- package/node_modules/ipaddr.js/package.json +17 -19
- package/node_modules/proxy-addr/HISTORY.md +11 -0
- package/node_modules/proxy-addr/README.md +3 -19
- package/node_modules/proxy-addr/index.js +1 -1
- package/node_modules/proxy-addr/package.json +30 -33
- package/node_modules/qs/.editorconfig +9 -0
- package/node_modules/qs/.eslintignore +2 -1
- package/node_modules/qs/.eslintrc +15 -1
- package/node_modules/qs/.github/FUNDING.yml +12 -0
- package/node_modules/qs/.nycrc +13 -0
- package/node_modules/qs/CHANGELOG.md +103 -0
- package/node_modules/qs/LICENSE.md +29 -0
- package/node_modules/qs/README.md +34 -0
- package/node_modules/qs/dist/qs.js +117 -67
- package/node_modules/qs/lib/formats.js +9 -4
- package/node_modules/qs/lib/parse.js +29 -14
- package/node_modules/qs/lib/stringify.js +55 -46
- package/node_modules/qs/lib/utils.js +23 -2
- package/node_modules/qs/package.json +42 -34
- package/node_modules/qs/test/parse.js +97 -1
- package/node_modules/qs/test/stringify.js +115 -1
- package/node_modules/qs/test/utils.js +1 -1
- package/node_modules/raw-body/HISTORY.md +14 -0
- package/node_modules/raw-body/README.md +3 -5
- package/node_modules/raw-body/node_modules/bytes/package.json +4 -4
- package/node_modules/raw-body/package.json +32 -35
- package/node_modules/send/HISTORY.md +10 -0
- package/node_modules/send/README.md +4 -6
- package/node_modules/send/index.js +7 -3
- package/node_modules/send/node_modules/ms/index.js +3 -3
- package/node_modules/send/node_modules/ms/license.md +1 -1
- package/node_modules/send/node_modules/ms/package.json +21 -23
- package/node_modules/send/node_modules/ms/readme.md +1 -2
- package/node_modules/send/package.json +31 -34
- package/node_modules/serve-static/HISTORY.md +8 -0
- package/node_modules/serve-static/README.md +9 -11
- package/node_modules/serve-static/package.json +30 -33
- package/node_modules/setprototypeof/README.md +1 -1
- package/node_modules/setprototypeof/index.js +1 -1
- package/node_modules/setprototypeof/package.json +20 -21
- package/node_modules/sockjs/Changelog +12 -0
- package/node_modules/sockjs/lib/transport.js +1 -1
- package/node_modules/sockjs/package.json +16 -19
- package/node_modules/toidentifier/HISTORY.md +9 -0
- package/node_modules/toidentifier/README.md +3 -3
- package/node_modules/toidentifier/index.js +2 -0
- package/node_modules/toidentifier/package.json +30 -29
- package/node_modules/uuid/CHANGELOG.md +154 -44
- package/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/node_modules/uuid/LICENSE.md +4 -16
- package/node_modules/uuid/README.md +384 -155
- package/node_modules/uuid/dist/bin/uuid +2 -0
- package/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/node_modules/uuid/{lib/md5-browser.js → dist/esm-browser/md5.js} +70 -71
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +19 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
- package/node_modules/uuid/{v1.js → dist/esm-browser/v1.js} +36 -50
- package/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +64 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +24 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/node_modules/uuid/dist/esm-node/stringify.js +29 -0
- package/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/node_modules/uuid/dist/esm-node/v35.js +64 -0
- package/node_modules/uuid/dist/esm-node/v4.js +24 -0
- package/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/node_modules/uuid/dist/index.js +79 -0
- package/node_modules/uuid/dist/md5-browser.js +223 -0
- package/node_modules/uuid/dist/md5.js +23 -0
- package/node_modules/uuid/dist/nil.js +8 -0
- package/node_modules/uuid/dist/parse.js +45 -0
- package/node_modules/uuid/dist/regex.js +8 -0
- package/node_modules/uuid/dist/rng-browser.js +26 -0
- package/node_modules/uuid/dist/rng.js +24 -0
- package/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/node_modules/uuid/dist/sha1.js +23 -0
- package/node_modules/uuid/dist/stringify.js +39 -0
- package/node_modules/uuid/dist/umd/uuid.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
- package/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
- package/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/node_modules/uuid/dist/v1.js +107 -0
- package/node_modules/uuid/dist/v3.js +16 -0
- package/node_modules/uuid/dist/v35.js +78 -0
- package/node_modules/uuid/dist/v4.js +37 -0
- package/node_modules/uuid/dist/v5.js +16 -0
- package/node_modules/uuid/dist/validate.js +17 -0
- package/node_modules/uuid/dist/version.js +21 -0
- package/node_modules/uuid/package.json +118 -57
- package/node_modules/uuid/wrapper.mjs +10 -0
- package/node_modules/websocket-driver/node_modules/http-parser-js/package.json +4 -4
- package/package.json +3 -3
- package/worldmap/index.html +1 -0
- package/worldmap/leaflet/leaflet-arc.min.js +1 -0
- package/worldmap/worldmap.js +49 -26
- package/worldmap.html +1 -1
- package/worldmap.js +2 -2
- package/node_modules/qs/LICENSE +0 -28
- package/node_modules/qs/test/.eslintrc +0 -17
- package/node_modules/qs/test/index.js +0 -7
- package/node_modules/uuid/AUTHORS +0 -5
- package/node_modules/uuid/bin/uuid +0 -65
- package/node_modules/uuid/index.js +0 -8
- package/node_modules/uuid/lib/bytesToUuid.js +0 -26
- package/node_modules/uuid/lib/md5.js +0 -25
- package/node_modules/uuid/lib/rng-browser.js +0 -34
- package/node_modules/uuid/lib/rng.js +0 -8
- package/node_modules/uuid/lib/sha1-browser.js +0 -89
- package/node_modules/uuid/lib/sha1.js +0 -25
- package/node_modules/uuid/lib/v35.js +0 -57
- package/node_modules/uuid/v3.js +0 -4
- package/node_modules/uuid/v4.js +0 -29
- package/node_modules/uuid/v5.js +0 -3
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _rng = _interopRequireDefault(require("./rng.js"));
|
|
9
|
+
|
|
10
|
+
var _stringify = _interopRequireDefault(require("./stringify.js"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
function v4(options, buf, offset) {
|
|
15
|
+
options = options || {};
|
|
16
|
+
|
|
17
|
+
const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
21
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
22
|
+
|
|
23
|
+
if (buf) {
|
|
24
|
+
offset = offset || 0;
|
|
25
|
+
|
|
26
|
+
for (let i = 0; i < 16; ++i) {
|
|
27
|
+
buf[offset + i] = rnds[i];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return buf;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return (0, _stringify.default)(rnds);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var _default = v4;
|
|
37
|
+
exports.default = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _v = _interopRequireDefault(require("./v35.js"));
|
|
9
|
+
|
|
10
|
+
var _sha = _interopRequireDefault(require("./sha1.js"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
const v5 = (0, _v.default)('v5', 0x50, _sha.default);
|
|
15
|
+
var _default = v5;
|
|
16
|
+
exports.default = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _regex = _interopRequireDefault(require("./regex.js"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function validate(uuid) {
|
|
13
|
+
return typeof uuid === 'string' && _regex.default.test(uuid);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
var _default = validate;
|
|
17
|
+
exports.default = _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _validate = _interopRequireDefault(require("./validate.js"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function version(uuid) {
|
|
13
|
+
if (!(0, _validate.default)(uuid)) {
|
|
14
|
+
throw TypeError('Invalid UUID');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return parseInt(uuid.substr(14, 1), 16);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var _default = version;
|
|
21
|
+
exports.default = _default;
|
|
@@ -1,84 +1,100 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"uuid@3.4.0",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
|
-
"_from": "uuid@3.4.0",
|
|
9
|
-
"_id": "uuid@3.4.0",
|
|
2
|
+
"_from": "uuid@^8.3.2",
|
|
3
|
+
"_id": "uuid@8.3.2",
|
|
10
4
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha512
|
|
12
|
-
"_location": "/uuid",
|
|
5
|
+
"_integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
|
|
6
|
+
"_location": "/node-red-contrib-web-worldmap/uuid",
|
|
13
7
|
"_phantomChildren": {},
|
|
14
8
|
"_requested": {
|
|
15
|
-
"type": "
|
|
9
|
+
"type": "range",
|
|
16
10
|
"registry": true,
|
|
17
|
-
"raw": "uuid
|
|
11
|
+
"raw": "uuid@^8.3.2",
|
|
18
12
|
"name": "uuid",
|
|
19
13
|
"escapedName": "uuid",
|
|
20
|
-
"rawSpec": "3.
|
|
14
|
+
"rawSpec": "^8.3.2",
|
|
21
15
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "3.
|
|
16
|
+
"fetchSpec": "^8.3.2"
|
|
23
17
|
},
|
|
24
18
|
"_requiredBy": [
|
|
25
|
-
"/sockjs"
|
|
19
|
+
"/node-red-contrib-web-worldmap/sockjs"
|
|
26
20
|
],
|
|
27
|
-
"_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.
|
|
28
|
-
"
|
|
29
|
-
"
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
|
|
22
|
+
"_shasum": "80d5b5ced271bb9af6c445f21a1a04c606cefbe2",
|
|
23
|
+
"_spec": "uuid@^8.3.2",
|
|
24
|
+
"_where": "/Users/conway/Projects/worldmap/node_modules/sockjs",
|
|
30
25
|
"bin": {
|
|
31
|
-
"uuid": "bin/uuid"
|
|
26
|
+
"uuid": "dist/bin/uuid"
|
|
32
27
|
},
|
|
33
28
|
"browser": {
|
|
34
|
-
"./
|
|
35
|
-
"./
|
|
36
|
-
"./
|
|
29
|
+
"./dist/md5.js": "./dist/md5-browser.js",
|
|
30
|
+
"./dist/rng.js": "./dist/rng-browser.js",
|
|
31
|
+
"./dist/sha1.js": "./dist/sha1-browser.js",
|
|
32
|
+
"./dist/esm-node/index.js": "./dist/esm-browser/index.js"
|
|
37
33
|
},
|
|
38
34
|
"bugs": {
|
|
39
35
|
"url": "https://github.com/uuidjs/uuid/issues"
|
|
40
36
|
},
|
|
37
|
+
"bundleDependencies": false,
|
|
41
38
|
"commitlint": {
|
|
42
39
|
"extends": [
|
|
43
40
|
"@commitlint/config-conventional"
|
|
44
41
|
]
|
|
45
42
|
},
|
|
46
|
-
"
|
|
47
|
-
{
|
|
48
|
-
"name": "Robert Kieffer",
|
|
49
|
-
"email": "robert@broofa.com"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"name": "Christoph Tavan",
|
|
53
|
-
"email": "dev@tavan.de"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"name": "AJ ONeal",
|
|
57
|
-
"email": "coolaj86@gmail.com"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"name": "Vincent Voyer",
|
|
61
|
-
"email": "vincent@zeroload.net"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"name": "Roman Shtylman",
|
|
65
|
-
"email": "shtylman@gmail.com"
|
|
66
|
-
}
|
|
67
|
-
],
|
|
43
|
+
"deprecated": false,
|
|
68
44
|
"description": "RFC4122 (v1, v4, and v5) UUIDs",
|
|
69
45
|
"devDependencies": {
|
|
70
|
-
"@
|
|
71
|
-
"@
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
46
|
+
"@babel/cli": "7.11.6",
|
|
47
|
+
"@babel/core": "7.11.6",
|
|
48
|
+
"@babel/preset-env": "7.11.5",
|
|
49
|
+
"@commitlint/cli": "11.0.0",
|
|
50
|
+
"@commitlint/config-conventional": "11.0.0",
|
|
51
|
+
"@rollup/plugin-node-resolve": "9.0.0",
|
|
52
|
+
"babel-eslint": "10.1.0",
|
|
53
|
+
"bundlewatch": "0.3.1",
|
|
54
|
+
"eslint": "7.10.0",
|
|
55
|
+
"eslint-config-prettier": "6.12.0",
|
|
56
|
+
"eslint-config-standard": "14.1.1",
|
|
57
|
+
"eslint-plugin-import": "2.22.1",
|
|
58
|
+
"eslint-plugin-node": "11.1.0",
|
|
59
|
+
"eslint-plugin-prettier": "3.1.4",
|
|
60
|
+
"eslint-plugin-promise": "4.2.1",
|
|
61
|
+
"eslint-plugin-standard": "4.0.1",
|
|
62
|
+
"husky": "4.3.0",
|
|
63
|
+
"jest": "25.5.4",
|
|
64
|
+
"lint-staged": "10.4.0",
|
|
65
|
+
"npm-run-all": "4.1.5",
|
|
66
|
+
"optional-dev-dependency": "2.0.1",
|
|
67
|
+
"prettier": "2.1.2",
|
|
68
|
+
"random-seed": "0.3.0",
|
|
69
|
+
"rollup": "2.28.2",
|
|
70
|
+
"rollup-plugin-terser": "7.0.2",
|
|
71
|
+
"runmd": "1.3.2",
|
|
72
|
+
"standard-version": "9.0.0"
|
|
77
73
|
},
|
|
74
|
+
"exports": {
|
|
75
|
+
".": {
|
|
76
|
+
"node": {
|
|
77
|
+
"module": "./dist/esm-node/index.js",
|
|
78
|
+
"require": "./dist/index.js",
|
|
79
|
+
"import": "./wrapper.mjs"
|
|
80
|
+
},
|
|
81
|
+
"default": "./dist/esm-browser/index.js"
|
|
82
|
+
},
|
|
83
|
+
"./package.json": "./package.json"
|
|
84
|
+
},
|
|
85
|
+
"files": [
|
|
86
|
+
"CHANGELOG.md",
|
|
87
|
+
"CONTRIBUTING.md",
|
|
88
|
+
"LICENSE.md",
|
|
89
|
+
"README.md",
|
|
90
|
+
"dist",
|
|
91
|
+
"wrapper.mjs"
|
|
92
|
+
],
|
|
78
93
|
"homepage": "https://github.com/uuidjs/uuid#readme",
|
|
79
94
|
"husky": {
|
|
80
95
|
"hooks": {
|
|
81
|
-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
96
|
+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
|
|
97
|
+
"pre-commit": "lint-staged"
|
|
82
98
|
}
|
|
83
99
|
},
|
|
84
100
|
"keywords": [
|
|
@@ -87,17 +103,62 @@
|
|
|
87
103
|
"rfc4122"
|
|
88
104
|
],
|
|
89
105
|
"license": "MIT",
|
|
106
|
+
"lint-staged": {
|
|
107
|
+
"*.{js,jsx,json,md}": [
|
|
108
|
+
"prettier --write"
|
|
109
|
+
],
|
|
110
|
+
"*.{js,jsx}": [
|
|
111
|
+
"eslint --fix"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"main": "./dist/index.js",
|
|
115
|
+
"module": "./dist/esm-node/index.js",
|
|
90
116
|
"name": "uuid",
|
|
117
|
+
"optionalDevDependencies": {
|
|
118
|
+
"@wdio/browserstack-service": "6.4.0",
|
|
119
|
+
"@wdio/cli": "6.4.0",
|
|
120
|
+
"@wdio/jasmine-framework": "6.4.0",
|
|
121
|
+
"@wdio/local-runner": "6.4.0",
|
|
122
|
+
"@wdio/spec-reporter": "6.4.0",
|
|
123
|
+
"@wdio/static-server-service": "6.4.0",
|
|
124
|
+
"@wdio/sync": "6.4.0"
|
|
125
|
+
},
|
|
91
126
|
"repository": {
|
|
92
127
|
"type": "git",
|
|
93
128
|
"url": "git+https://github.com/uuidjs/uuid.git"
|
|
94
129
|
},
|
|
95
130
|
"scripts": {
|
|
96
|
-
"
|
|
131
|
+
"build": "./scripts/build.sh",
|
|
132
|
+
"bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
|
|
133
|
+
"docs": "( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )",
|
|
134
|
+
"docs:diff": "npm run docs && git diff --quiet README.md",
|
|
135
|
+
"eslint:check": "eslint src/ test/ examples/ *.js",
|
|
136
|
+
"eslint:fix": "eslint --fix src/ test/ examples/ *.js",
|
|
137
|
+
"examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build",
|
|
138
|
+
"examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build",
|
|
139
|
+
"examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test",
|
|
140
|
+
"examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test",
|
|
141
|
+
"lint": "npm run eslint:check && npm run prettier:check",
|
|
97
142
|
"md": "runmd --watch --output=README.md README_js.md",
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
143
|
+
"prepack": "npm run build",
|
|
144
|
+
"pretest": "[ -n $CI ] || npm run build",
|
|
145
|
+
"pretest:benchmark": "npm run build",
|
|
146
|
+
"pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**",
|
|
147
|
+
"pretest:node": "npm run build",
|
|
148
|
+
"prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'",
|
|
149
|
+
"prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'",
|
|
150
|
+
"release": "standard-version --no-verify",
|
|
151
|
+
"test": "BABEL_ENV=commonjs node --throw-deprecation node_modules/.bin/jest test/unit/",
|
|
152
|
+
"test:benchmark": "cd examples/benchmark && npm install && npm test",
|
|
153
|
+
"test:browser": "wdio run ./wdio.conf.js",
|
|
154
|
+
"test:node": "npm-run-all --parallel examples:node:**",
|
|
155
|
+
"test:pack": "./scripts/testpack.sh"
|
|
156
|
+
},
|
|
157
|
+
"sideEffects": false,
|
|
158
|
+
"standard-version": {
|
|
159
|
+
"scripts": {
|
|
160
|
+
"postchangelog": "prettier --write CHANGELOG.md"
|
|
161
|
+
}
|
|
101
162
|
},
|
|
102
|
-
"version": "3.
|
|
163
|
+
"version": "8.3.2"
|
|
103
164
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import uuid from './dist/index.js';
|
|
2
|
+
export const v1 = uuid.v1;
|
|
3
|
+
export const v3 = uuid.v3;
|
|
4
|
+
export const v4 = uuid.v4;
|
|
5
|
+
export const v5 = uuid.v5;
|
|
6
|
+
export const NIL = uuid.NIL;
|
|
7
|
+
export const version = uuid.version;
|
|
8
|
+
export const validate = uuid.validate;
|
|
9
|
+
export const stringify = uuid.stringify;
|
|
10
|
+
export const parse = uuid.parse;
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"_args": [
|
|
3
3
|
[
|
|
4
4
|
"http-parser-js@0.5.2",
|
|
5
|
-
"/Users/conway
|
|
5
|
+
"/Users/conway/.node-red"
|
|
6
6
|
]
|
|
7
7
|
],
|
|
8
8
|
"_from": "http-parser-js@0.5.2",
|
|
9
9
|
"_id": "http-parser-js@0.5.2",
|
|
10
10
|
"_inBundle": false,
|
|
11
11
|
"_integrity": "sha512-opCO9ASqg5Wy2FNo7A0sxy71yGbbkJJXLdgMK04Tcypw9jr2MgWbyubb0+WdmDmGnFflO7fRbqbaihh/ENDlRQ==",
|
|
12
|
-
"_location": "/websocket-driver/http-parser-js",
|
|
12
|
+
"_location": "/node-red-contrib-web-worldmap/websocket-driver/http-parser-js",
|
|
13
13
|
"_phantomChildren": {},
|
|
14
14
|
"_requested": {
|
|
15
15
|
"type": "version",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"fetchSpec": "0.5.2"
|
|
23
23
|
},
|
|
24
24
|
"_requiredBy": [
|
|
25
|
-
"/websocket-driver"
|
|
25
|
+
"/node-red-contrib-web-worldmap/websocket-driver"
|
|
26
26
|
],
|
|
27
27
|
"_resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.2.tgz",
|
|
28
28
|
"_spec": "0.5.2",
|
|
29
|
-
"_where": "/Users/conway
|
|
29
|
+
"_where": "/Users/conway/.node-red",
|
|
30
30
|
"author": {
|
|
31
31
|
"name": "Tim Caswell",
|
|
32
32
|
"url": "https://github.com/creationix"
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-web-worldmap",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.24.1",
|
|
4
4
|
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@turf/bezier-spline": "~6.5.0",
|
|
7
7
|
"cgi": "0.3.1",
|
|
8
8
|
"compression": "^1.7.4",
|
|
9
|
-
"express": "^4.
|
|
10
|
-
"sockjs": "~0.3.
|
|
9
|
+
"express": "^4.17.2",
|
|
10
|
+
"sockjs": "~0.3.24"
|
|
11
11
|
},
|
|
12
12
|
"bundledDependencies": [
|
|
13
13
|
"cgi",
|
package/worldmap/index.html
CHANGED
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
<script src="leaflet/leaflet.latlng-graticule.js"></script>
|
|
73
73
|
<script src="leaflet/VectorTileLayer.umd.min.js"></script>
|
|
74
74
|
<script src="leaflet/Semicircle.js"></script>
|
|
75
|
+
<script src='leaflet/leaflet-arc.min.js'></script>
|
|
75
76
|
<script src="leaflet/L.TileLayer.PixelFilter.js"></script>
|
|
76
77
|
<script src="leaflet/dialog-polyfill.js"></script>
|
|
77
78
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("leaflet-arc",[],e):"object"==typeof exports?exports["leaflet-arc"]=e():t["leaflet-arc"]=e()}(this,function(){return function(t){function e(o){if(r[o])return r[o].exports;var s=r[o]={exports:{},id:o,loaded:!1};return t[o].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function o(t){return t&&t.__esModule?t:{"default":t}}function s(t,e){if(!t.geometries[0]||!t.geometries[0].coords[0])return[];var r=function(){var r=e.lng-t.geometries[0].coords[0][0]-360;return{v:t.geometries.map(function(t){return r+=360,t.coords.map(function(t){return L.latLng([t[1],t[0]+r])})}).reduce(function(t,e){return t.concat(e)})}}();return"object"===("undefined"==typeof r?"undefined":n(r))?r.v:void 0}var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=r(2),h=o(a),p=function(t){return{x:t.lng,y:t.lat}};if(!L)throw new Error("Leaflet is not defined");L.Polyline.Arc=function(t,e,r){var o=L.latLng(t),n=L.latLng(e),a=i({vertices:10,offset:10},r),u=new h["default"].GreatCircle(p(o),p(n)),c=u.Arc(a.vertices,{offset:a.offset}),f=s(c,o);return L.polyline(f,a)}},function(t,e){"use strict";var r=Math.PI/180,o=180/Math.PI,s=function(t,e){this.lon=t,this.lat=e,this.x=r*t,this.y=r*e};s.prototype.view=function(){return String(this.lon).slice(0,4)+","+String(this.lat).slice(0,4)},s.prototype.antipode=function(){var t=-1*this.lat,e=this.lon<0?180+this.lon:(180-this.lon)*-1;return new s(e,t)};var i=function(){this.coords=[],this.length=0};i.prototype.move_to=function(t){this.length++,this.coords.push(t)};var n=function(t){this.properties=t||{},this.geometries=[]};n.prototype.json=function(){if(this.geometries.length<=0)return{geometry:{type:"LineString",coordinates:null},type:"Feature",properties:this.properties};if(1==this.geometries.length)return{geometry:{type:"LineString",coordinates:this.geometries[0].coords},type:"Feature",properties:this.properties};for(var t=[],e=0;e<this.geometries.length;e++)t.push(this.geometries[e].coords);return{geometry:{type:"MultiLineString",coordinates:t},type:"Feature",properties:this.properties}},n.prototype.wkt=function(){for(var t="",e="LINESTRING(",r=function(t){e+=t[0]+" "+t[1]+","},o=0;o<this.geometries.length;o++){if(0===this.geometries[o].coords.length)return"LINESTRING(empty)";var s=this.geometries[o].coords;s.forEach(r),t+=e.substring(0,e.length-1)+")"}return t};var a=function(t,e,r){if(!t||void 0===t.x||void 0===t.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");if(!e||void 0===e.x||void 0===e.y)throw new Error("GreatCircle constructor expects two args: start and end objects with x and y properties");this.start=new s(t.x,t.y),this.end=new s(e.x,e.y),this.properties=r||{};var o=this.start.x-this.end.x,i=this.start.y-this.end.y,n=Math.pow(Math.sin(i/2),2)+Math.cos(this.start.y)*Math.cos(this.end.y)*Math.pow(Math.sin(o/2),2);if(this.g=2*Math.asin(Math.sqrt(n)),this.g==Math.PI)throw new Error("it appears "+t.view()+" and "+e.view()+" are 'antipodal', e.g diametrically opposite, thus there is no single route but rather infinite");if(isNaN(this.g))throw new Error("could not calculate great circle between "+t+" and "+e)};if(a.prototype.interpolate=function(t){var e=Math.sin((1-t)*this.g)/Math.sin(this.g),r=Math.sin(t*this.g)/Math.sin(this.g),s=e*Math.cos(this.start.y)*Math.cos(this.start.x)+r*Math.cos(this.end.y)*Math.cos(this.end.x),i=e*Math.cos(this.start.y)*Math.sin(this.start.x)+r*Math.cos(this.end.y)*Math.sin(this.end.x),n=e*Math.sin(this.start.y)+r*Math.sin(this.end.y),a=o*Math.atan2(n,Math.sqrt(Math.pow(s,2)+Math.pow(i,2))),h=o*Math.atan2(i,s);return[h,a]},a.prototype.Arc=function(t,e){var r=[];if(!t||t<=2)r.push([this.start.lon,this.start.lat]),r.push([this.end.lon,this.end.lat]);else for(var o=1/(t-1),s=0;s<t;++s){var a=o*s,h=this.interpolate(a);r.push(h)}for(var p=!1,u=0,c=e&&e.offset?e.offset:10,f=180-c,l=-180+c,d=360-c,y=1;y<r.length;++y){var g=r[y-1][0],v=r[y][0],M=Math.abs(v-g);M>d&&(v>f&&g<l||g>f&&v<l)?p=!0:M>u&&(u=M)}var m=[];if(p&&u<c){var w=[];m.push(w);for(var x=0;x<r.length;++x){var b=parseFloat(r[x][0]);if(x>0&&Math.abs(b-r[x-1][0])>d){var L=parseFloat(r[x-1][0]),S=parseFloat(r[x-1][1]),j=parseFloat(r[x][0]),E=parseFloat(r[x][1]);if(L>-180&&L<l&&180==j&&x+1<r.length&&r[x-1][0]>-180&&r[x-1][0]<l){w.push([-180,r[x][1]]),x++,w.push([r[x][0],r[x][1]]);continue}if(L>f&&L<180&&j==-180&&x+1<r.length&&r[x-1][0]>f&&r[x-1][0]<180){w.push([180,r[x][1]]),x++,w.push([r[x][0],r[x][1]]);continue}if(L<l&&j>f){var F=L;L=j,j=F;var C=S;S=E,E=C}if(L>f&&j<l&&(j+=360),L<=180&&j>=180&&L<j){var G=(180-L)/(j-L),I=G*E+(1-G)*S;w.push([r[x-1][0]>f?180:-180,I]),w=[],w.push([r[x-1][0]>f?-180:180,I]),m.push(w)}else w=[],m.push(w);w.push([b,r[x][1]])}else w.push([r[x][0],r[x][1]])}}else{var N=[];m.push(N);for(var A=0;A<r.length;++A)N.push([r[A][0],r[A][1]])}for(var P=new n(this.properties),_=0;_<m.length;++_){var O=new i;P.geometries.push(O);for(var q=m[_],R=0;R<q.length;++R)O.move_to(q[R])}return P},"undefined"!=typeof t&&"undefined"!=typeof t.exports)t.exports.Coord=s,t.exports.Arc=n,t.exports.GreatCircle=a;else{var h={};h.Coord=s,h.Arc=n,h.GreatCircle=a}},function(t,e,r){"use strict";t.exports=r(1)}])});
|
package/worldmap/worldmap.js
CHANGED
|
@@ -30,8 +30,9 @@ var sidebyside;
|
|
|
30
30
|
var layercontrol;
|
|
31
31
|
var drawControl;
|
|
32
32
|
var drawingColour = "#910000";
|
|
33
|
-
var sendRoute;
|
|
34
33
|
var sendDrawing;
|
|
34
|
+
var colorControl;
|
|
35
|
+
var sendRoute;
|
|
35
36
|
|
|
36
37
|
var iconSz = {
|
|
37
38
|
"Team/Crew": 24,
|
|
@@ -132,7 +133,7 @@ var handleData = function(data) {
|
|
|
132
133
|
|
|
133
134
|
window.onunload = function() { if (ws) ws.close(); }
|
|
134
135
|
|
|
135
|
-
var onoffline = function() { if (!navigator.onLine) map.addLayer(layers["_countries"]); }
|
|
136
|
+
var onoffline = function() { if (!navigator.onLine) { map.addLayer(layers["_countries"]); } }
|
|
136
137
|
|
|
137
138
|
document.addEventListener ("keydown", function (ev) {
|
|
138
139
|
// Set Ctl-Alt-3 to switch to 3d view
|
|
@@ -253,16 +254,6 @@ var menuButton = L.easyButton({states:[{icon:'fa-bars fa-lg', onClick:function()
|
|
|
253
254
|
var fullscreenButton = L.control.fullscreen();
|
|
254
255
|
var rulerButton = L.control.ruler({position:"topleft"});
|
|
255
256
|
|
|
256
|
-
//var colorPickButton = L.easyButton({states:[{icon:'fa-tint fa-lg', onClick:function() { console.log("PICK"); }, title:'Pick Colour'}]});
|
|
257
|
-
var redButton = L.easyButton('fa-square wm-red', function(btn) { changeDrawColour("#E7827F"); })
|
|
258
|
-
var blueButton = L.easyButton('fa-square wm-blue', function(btn) { changeDrawColour("#94CCE2"); })
|
|
259
|
-
var greenButton = L.easyButton('fa-square wm-green', function(btn) { changeDrawColour("#ACD6A4"); })
|
|
260
|
-
var yellowButton = L.easyButton('fa-square wm-yellow', function(btn) { changeDrawColour("#F5F08B"); })
|
|
261
|
-
var blackButton = L.easyButton('fa-square wm-black', function(btn) { changeDrawColour("#444444"); })
|
|
262
|
-
var whiteButton = L.easyButton('fa-square wm-white', function(btn) { changeDrawColour("#EEEEEE"); })
|
|
263
|
-
var colorControl = L.easyBar([redButton,blueButton,greenButton,yellowButton,blackButton,whiteButton]);
|
|
264
|
-
|
|
265
|
-
|
|
266
257
|
function onLocationFound(e) {
|
|
267
258
|
var radius = e.accuracy;
|
|
268
259
|
//L.marker(e.latlng).addTo(map).bindPopup("You are within " + radius + " meters from this point").openPopup();
|
|
@@ -658,7 +649,7 @@ map.on('moveend', function() {
|
|
|
658
649
|
// single right click to add a marker
|
|
659
650
|
var addmenu = "<b>Add marker</b><br><input type='text' id='rinput' autofocus onkeydown='if (event.keyCode == 13) addThing();' placeholder='name (,icon/SIDC, layer, colour, heading)'/>";
|
|
660
651
|
if (navigator.onLine) { addmenu += '<br/><a href="https://spatialillusions.com/unitgenerator/" target="_new">MilSymbol SIDC generator</a>'; }
|
|
661
|
-
var rightmenuMap = L.popup({keepInView:true, minWidth:
|
|
652
|
+
var rightmenuMap = L.popup({keepInView:true, minWidth:260}).setContent(addmenu);
|
|
662
653
|
|
|
663
654
|
var rclk = {};
|
|
664
655
|
var hiderightclick = false;
|
|
@@ -744,9 +735,10 @@ var addBaseMaps = function(maplist,first) {
|
|
|
744
735
|
//console.log("MAPS",first,maplist)
|
|
745
736
|
if (navigator.onLine) {
|
|
746
737
|
var layerlookup = { OSMG:"OSM grey", OSMC:"OSM", OSMH:"OSM Humanitarian", EsriC:"Esri", EsriS:"Esri Satellite",
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
738
|
+
EsriR:"Esri Relief", EsriT:"Esri Topography", EsriO:"Esri Ocean", EsriDG:"Esri Dark Grey", NatGeo: "National Geographic",
|
|
739
|
+
UKOS:"UK OS OpenData", UKOS45:"UK OS 1919-1947", UKOS00:"UK OS 1900", OpTop:"Open Topo Map",
|
|
740
|
+
HB:"Hike Bike OSM", ST:"Stamen Topography", SW: "Stamen Watercolor", AN:"AutoNavi (Chinese)"
|
|
741
|
+
}
|
|
750
742
|
|
|
751
743
|
// Use this for OSM online maps
|
|
752
744
|
var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
|
@@ -874,7 +866,7 @@ var addBaseMaps = function(maplist,first) {
|
|
|
874
866
|
|
|
875
867
|
if (maplist.indexOf("OS00")!==-1) {
|
|
876
868
|
//var NLS_OS_1900 = L.tileLayer('https://nls-{s}.tileserver.com/NLS_API/{z}/{x}/{y}.jpg', {
|
|
877
|
-
|
|
869
|
+
basemaps[layerlookup["OS00"]] = L.tileLayer('https://nls-{s}.tileserver.com/fpsUZbzrfb5d/{z}/{x}/{y}.jpg', {
|
|
878
870
|
attribution: '<a href="https://geo.nls.uk/maps/">National Library of Scotland Historic Maps</a>',
|
|
879
871
|
bounds: [[49.6, -12], [61.7, 3]],
|
|
880
872
|
minZoom:1, maxNativeZoom:19, maxZoom:20,
|
|
@@ -929,6 +921,15 @@ var addOverlays = function(overlist) {
|
|
|
929
921
|
|
|
930
922
|
// Add the drawing layer...
|
|
931
923
|
if (overlist.indexOf("DR")!==-1) {
|
|
924
|
+
//var colorPickButton = L.easyButton({states:[{icon:'fa-tint fa-lg', onClick:function() { console.log("PICK"); }, title:'Pick Colour'}]});
|
|
925
|
+
var redButton = L.easyButton('fa-square wm-red', function(btn) { changeDrawColour("#E7827F"); })
|
|
926
|
+
var blueButton = L.easyButton('fa-square wm-blue', function(btn) { changeDrawColour("#94CCE2"); })
|
|
927
|
+
var greenButton = L.easyButton('fa-square wm-green', function(btn) { changeDrawColour("#ACD6A4"); })
|
|
928
|
+
var yellowButton = L.easyButton('fa-square wm-yellow', function(btn) { changeDrawColour("#F5F08B"); })
|
|
929
|
+
var blackButton = L.easyButton('fa-square wm-black', function(btn) { changeDrawColour("#444444"); })
|
|
930
|
+
var whiteButton = L.easyButton('fa-square wm-white', function(btn) { changeDrawColour("#EEEEEE"); })
|
|
931
|
+
colorControl = L.easyBar([redButton,blueButton,greenButton,yellowButton,blackButton,whiteButton]);
|
|
932
|
+
|
|
932
933
|
layers["_drawing"] = new L.FeatureGroup();
|
|
933
934
|
overlays["drawing"] = layers["_drawing"];
|
|
934
935
|
map.options.drawControlTooltips = false;
|
|
@@ -951,11 +952,13 @@ var addOverlays = function(overlist) {
|
|
|
951
952
|
// }
|
|
952
953
|
});
|
|
953
954
|
var changeDrawColour = function(col) {
|
|
955
|
+
drawingColour = col;
|
|
956
|
+
console.log("COL",col)
|
|
954
957
|
drawControl.setDrawingOptions({
|
|
955
|
-
polyline: { shapeOptions: { color:
|
|
956
|
-
circle: { shapeOptions: { color:
|
|
957
|
-
rectangle: { shapeOptions: { color:
|
|
958
|
-
polygon: { shapeOptions: { color:
|
|
958
|
+
polyline: { shapeOptions: { color:drawingColour } },
|
|
959
|
+
circle: { shapeOptions: { color:drawingColour } },
|
|
960
|
+
rectangle: { shapeOptions: { color:drawingColour } },
|
|
961
|
+
polygon: { shapeOptions: { color:drawingColour } }
|
|
959
962
|
});
|
|
960
963
|
}
|
|
961
964
|
var shape;
|
|
@@ -1188,7 +1191,7 @@ var addOverlays = function(overlist) {
|
|
|
1188
1191
|
|
|
1189
1192
|
// Layer control based on select box rather than radio buttons.
|
|
1190
1193
|
//var layercontrol = L.control.selectLayers(basemaps, overlays).addTo(map);
|
|
1191
|
-
|
|
1194
|
+
layercontrol = L.control.layers(basemaps, overlays);
|
|
1192
1195
|
|
|
1193
1196
|
// Add the layers control widget
|
|
1194
1197
|
if (!inIframe) { layercontrol.addTo(map); }
|
|
@@ -1351,13 +1354,15 @@ function setMarker(data) {
|
|
|
1351
1354
|
opt.color = data.color || data.lineColor || "#910000";
|
|
1352
1355
|
opt.fillColor = data.fillColor || "#910000";
|
|
1353
1356
|
opt.stroke = (data.hasOwnProperty("stroke")) ? data.stroke : true;
|
|
1354
|
-
opt.weight = data.weight
|
|
1355
|
-
opt.opacity = data.opacity
|
|
1357
|
+
opt.weight = data.weight;
|
|
1358
|
+
opt.opacity = data.opacity;
|
|
1356
1359
|
opt.fillOpacity = data.fillOpacity;
|
|
1357
1360
|
opt.clickable = (data.hasOwnProperty("clickable")) ? data.clickable : false;
|
|
1358
1361
|
opt.fill = (data.hasOwnProperty("fill")) ? data.fill : true;
|
|
1359
1362
|
if (data.hasOwnProperty("dashArray")) { opt.dashArray = data.dashArray; }
|
|
1360
1363
|
if (opt.fillOpacity === undefined) { opt.fillOpacity = 0.2; }
|
|
1364
|
+
if (opt.opacity === undefined) { opt.opacity = 1; }
|
|
1365
|
+
if (opt.weight === undefined) { opt.weight = 2; }
|
|
1361
1366
|
|
|
1362
1367
|
// Replace building
|
|
1363
1368
|
if (data.hasOwnProperty("building")) {
|
|
@@ -1426,12 +1431,29 @@ function setMarker(data) {
|
|
|
1426
1431
|
if (!data.hasOwnProperty("opacity")) { opt.opacity = 0.8; }
|
|
1427
1432
|
var polyln = L.polyline(data.line, opt);
|
|
1428
1433
|
polygons[data.name] = rightmenu(polyln);
|
|
1434
|
+
if (data.hasOwnProperty("fit") && data.fit === true) {
|
|
1435
|
+
map.fitBounds(polygons[data.name].getBounds(),{padding:[50,50]})
|
|
1436
|
+
}
|
|
1429
1437
|
}
|
|
1430
1438
|
else if (data.hasOwnProperty("area") && Array.isArray(data.area)) {
|
|
1431
1439
|
var polyarea;
|
|
1432
1440
|
if (data.area.length === 2) { polyarea = L.rectangle(data.area, opt); }
|
|
1433
1441
|
else { polyarea = L.polygon(data.area, opt); }
|
|
1434
1442
|
polygons[data.name] = rightmenu(polyarea);
|
|
1443
|
+
if (data.hasOwnProperty("fit") && data.fit === true) {
|
|
1444
|
+
map.fitBounds(polygons[data.name].getBounds(),{padding:[50,50]})
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
if (data.hasOwnProperty("greatcircle") && Array.isArray(data.greatcircle) && data.greatcircle.length === 2) {
|
|
1448
|
+
delete opt.fill;
|
|
1449
|
+
opt.vertices = opt.vertices || 100;
|
|
1450
|
+
if (!data.hasOwnProperty("weight")) { opt.weight = 3; } //Standard settings different for lines
|
|
1451
|
+
if (!data.hasOwnProperty("opacity")) { opt.opacity = 0.8; }
|
|
1452
|
+
var greatc = L.Polyline.Arc(data.greatcircle[0], data.greatcircle[1], opt);
|
|
1453
|
+
polygons[data.name] = rightmenu(greatc);
|
|
1454
|
+
if (data.hasOwnProperty("fit") && data.fit === true) {
|
|
1455
|
+
map.fitBounds(polygons[data.name].getBounds(),{padding:[50,50]})
|
|
1456
|
+
}
|
|
1435
1457
|
}
|
|
1436
1458
|
else if (data.hasOwnProperty("sdlat") && data.hasOwnProperty("sdlon")) {
|
|
1437
1459
|
if (!data.hasOwnProperty("iconColor")) { opt.color = "blue"; } //different standard Color Settings
|
|
@@ -1443,7 +1465,8 @@ function setMarker(data) {
|
|
|
1443
1465
|
if (data.hasOwnProperty("lat") && data.hasOwnProperty("lon")) {
|
|
1444
1466
|
var polycirc;
|
|
1445
1467
|
if (Array.isArray(data.radius)) {
|
|
1446
|
-
polycirc = L.ellipse(new L.LatLng((data.lat*1), (data.lon*1)), [data.radius[0]*Math.cos(data.lat*Math.PI/180), data.radius[1]], data.tilt || 0, opt);
|
|
1468
|
+
//polycirc = L.ellipse(new L.LatLng((data.lat*1), (data.lon*1)), [data.radius[0]*Math.cos(data.lat*Math.PI/180), data.radius[1]], data.tilt || 0, opt);
|
|
1469
|
+
polycirc = L.ellipse(new L.LatLng((data.lat*1), (data.lon*1)), [data.radius[0], data.radius[1]], data.tilt || 0, opt);
|
|
1447
1470
|
}
|
|
1448
1471
|
else {
|
|
1449
1472
|
polycirc = L.circle(new L.LatLng((data.lat*1), (data.lon*1)), data.radius*1, opt);
|
|
@@ -1989,7 +2012,7 @@ function setMarker(data) {
|
|
|
1989
2012
|
fb.action = "click";
|
|
1990
2013
|
ws.send(JSON.stringify(fb));
|
|
1991
2014
|
});
|
|
1992
|
-
if (heat && ((data.addtoheatmap
|
|
2015
|
+
if (heat && ((data.addtoheatmap != false) || (!data.hasOwnProperty("addtoheatmap")))) { // Added to give ability to control if points from active layer contribute to heatmap
|
|
1993
2016
|
if (heatAll || map.hasLayer(layers[lay])) { heat.addLatLng(lli); }
|
|
1994
2017
|
}
|
|
1995
2018
|
markers[data.name] = marker;
|
package/worldmap.html
CHANGED
|
@@ -438,7 +438,7 @@ If <i>Web Path</i> is left empty, then by default <code>⌘⇧m</code> - <code>c
|
|
|
438
438
|
}
|
|
439
439
|
});
|
|
440
440
|
|
|
441
|
-
$.get('
|
|
441
|
+
$.get('-ui-worldmap', function (data) {
|
|
442
442
|
if (data === "true") {
|
|
443
443
|
RED.nodes.registerType('ui_worldmap',{
|
|
444
444
|
category: 'dashboard',
|
package/worldmap.js
CHANGED
|
@@ -153,7 +153,7 @@ module.exports = function(RED) {
|
|
|
153
153
|
var size = ui.getSizes();
|
|
154
154
|
var frameWidth = (size.sx + size.cx) * width - size.cx;
|
|
155
155
|
var frameHeight = (size.sy + size.cy) * height - size.cy;
|
|
156
|
-
var url = encodeURI(config.path);
|
|
156
|
+
var url = encodeURI(path.posix.join(RED.settings.httpNodeRoot||RED.settings.httpRoot,config.path));
|
|
157
157
|
var html = `<style>.nr-dashboard-ui_worldmap{padding:0;}</style><div style="overflow:hidden;">
|
|
158
158
|
<iframe src="${url}" width="${frameWidth}px" height="${frameHeight}px" style="border:none;"></iframe></div>`;
|
|
159
159
|
return html;
|
|
@@ -525,7 +525,7 @@ module.exports = function(RED) {
|
|
|
525
525
|
}
|
|
526
526
|
RED.nodes.registerType("worldmap-hull",WorldMapHull);
|
|
527
527
|
|
|
528
|
-
RED.
|
|
528
|
+
RED.httpAdmin.get("/-ui-worldmap", RED.auth.needsPermission('rpi-ui-worldmap.read'), function(req, res) {
|
|
529
529
|
res.send(ui ? "true": "false");
|
|
530
530
|
});
|
|
531
531
|
}
|
package/node_modules/qs/LICENSE
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2014 Nathan LaFreniere and other contributors.
|
|
2
|
-
All rights reserved.
|
|
3
|
-
|
|
4
|
-
Redistribution and use in source and binary forms, with or without
|
|
5
|
-
modification, are permitted provided that the following conditions are met:
|
|
6
|
-
* Redistributions of source code must retain the above copyright
|
|
7
|
-
notice, this list of conditions and the following disclaimer.
|
|
8
|
-
* Redistributions in binary form must reproduce the above copyright
|
|
9
|
-
notice, this list of conditions and the following disclaimer in the
|
|
10
|
-
documentation and/or other materials provided with the distribution.
|
|
11
|
-
* The names of any contributors may not be used to endorse or promote
|
|
12
|
-
products derived from this software without specific prior written
|
|
13
|
-
permission.
|
|
14
|
-
|
|
15
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
16
|
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
17
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
18
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
|
|
19
|
-
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
20
|
-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
21
|
-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
22
|
-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
23
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
24
|
-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
25
|
-
|
|
26
|
-
* * *
|
|
27
|
-
|
|
28
|
-
The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors
|