node-red-contrib-web-worldmap 2.39.0 → 2.40.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 +2 -0
- package/README.md +12 -2
- package/node_modules/faye-websocket/CHANGELOG.md +139 -0
- package/node_modules/path-to-regexp/History.md +36 -0
- package/node_modules/websocket-driver/CHANGELOG.md +142 -0
- package/node_modules/websocket-driver/node_modules/http-parser-js/CHANGELOG.md +14 -0
- package/node_modules/websocket-extensions/CHANGELOG.md +28 -0
- package/package.json +3 -2
- package/worldmap/worldmap.js +75 -3
- package/worldmap.html +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
### Change Log for Node-RED Worldmap
|
|
2
2
|
|
|
3
|
+
- v2.40.1 - Fix missing countries overlay when starting disconnected.
|
|
4
|
+
- v2.40.0 - Add handling for TAK event points from TAK ingest node.
|
|
3
5
|
- v2.39.0 - Add client timezone to connect message. PR #245
|
|
4
6
|
- v2.38.3 - Better fix for geojson multipoint icons.
|
|
5
7
|
- v2.38.1 - Fix for geojson multipoint icons.
|
package/README.md
CHANGED
|
@@ -13,6 +13,8 @@ Feel free to [ can use the [TAK ingest node](https://flows.nodered.org/node/node-red-contrib-tak-registration) to create a JSON formatted TAK event object, received from a TAK server. This can be fed directly into the worldmap node.
|
|
130
|
+
|
|
131
|
+

|
|
132
|
+

|
|
133
|
+
|
|
134
|
+
|
|
125
135
|
### Areas, Rectangles, Lines, and GreatCircles
|
|
126
136
|
|
|
127
137
|
If the msg.payload contains an **area** property - that is an array of co-ordinates, e.g.
|
|
@@ -698,7 +708,7 @@ and use a url like `"url": "http://localhost:1882/?map=/maps/my-app.map",`
|
|
|
698
708
|
|
|
699
709
|
To use a vector mbtiles server like **MapTiler** then you can download your mbtiles file into a directory and then from that directory run
|
|
700
710
|
```
|
|
701
|
-
docker run --name maptiler -d -v $(pwd):/data -p 1884:8080 maptiler/tileserver-gl -p 8080
|
|
711
|
+
docker run --name maptiler -d -v $(pwd):/data -p 1884:8080 maptiler/tileserver-gl -p 8080 --mbtiles yourMapFile.mbtiles
|
|
702
712
|
```
|
|
703
713
|
and use a url like `"url": "http://localhost:1884/styles/basic-preview/{z}/{x}/{y}.png"`
|
|
704
714
|
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
### 0.11.4 / 2021-05-24
|
|
2
|
+
|
|
3
|
+
- Prevent the client hanging if `close()` is called when already closing
|
|
4
|
+
|
|
5
|
+
### 0.11.3 / 2019-06-10
|
|
6
|
+
|
|
7
|
+
- Fix a race condition that caused a timeout not to be cancelled immediately
|
|
8
|
+
when the WebSocket is closed
|
|
9
|
+
- Change license from MIT to Apache 2.0
|
|
10
|
+
|
|
11
|
+
### 0.11.2 / 2019-06-10
|
|
12
|
+
|
|
13
|
+
(This version was pulled due to an error when publishing)
|
|
14
|
+
|
|
15
|
+
### 0.11.1 / 2017-01-22
|
|
16
|
+
|
|
17
|
+
- Forcibly close the I/O stream after a timeout if the peer does not respond
|
|
18
|
+
after calling `close()`
|
|
19
|
+
|
|
20
|
+
### 0.11.0 / 2016-02-24
|
|
21
|
+
|
|
22
|
+
- Introduce a `net` option to the `Client` class for setting things like, say,
|
|
23
|
+
`servername`
|
|
24
|
+
|
|
25
|
+
### 0.10.0 / 2015-07-08
|
|
26
|
+
|
|
27
|
+
- Add the standard `code` and `reason` parameters to the `close` method
|
|
28
|
+
|
|
29
|
+
### 0.9.4 / 2015-03-08
|
|
30
|
+
|
|
31
|
+
- Don't send input to the driver before `start()` is called
|
|
32
|
+
|
|
33
|
+
### 0.9.3 / 2015-02-19
|
|
34
|
+
|
|
35
|
+
- Make sure the TCP socket is not left open when closing the connection
|
|
36
|
+
|
|
37
|
+
### 0.9.2 / 2014-12-21
|
|
38
|
+
|
|
39
|
+
- Only emit `error` once, and don't emit it after `close`
|
|
40
|
+
|
|
41
|
+
### 0.9.1 / 2014-12-18
|
|
42
|
+
|
|
43
|
+
- Check that all options to the WebSocket constructor are recognized
|
|
44
|
+
|
|
45
|
+
### 0.9.0 / 2014-12-13
|
|
46
|
+
|
|
47
|
+
- Allow protocol extensions to be passed into websocket-extensions
|
|
48
|
+
|
|
49
|
+
### 0.8.1 / 2014-11-12
|
|
50
|
+
|
|
51
|
+
- Send the correct hostname when upgrading a connection to TLS
|
|
52
|
+
|
|
53
|
+
### 0.8.0 / 2014-11-08
|
|
54
|
+
|
|
55
|
+
- Support connections via HTTP proxies
|
|
56
|
+
- Close the connection cleanly if we're still waiting for a handshake response
|
|
57
|
+
|
|
58
|
+
### 0.7.3 / 2014-10-04
|
|
59
|
+
|
|
60
|
+
- Allow sockets to be closed when they are in any state other than `CLOSED`
|
|
61
|
+
|
|
62
|
+
### 0.7.2 / 2013-12-29
|
|
63
|
+
|
|
64
|
+
- Make sure the `close` event is emitted by clients on Node v0.10
|
|
65
|
+
|
|
66
|
+
### 0.7.1 / 2013-12-03
|
|
67
|
+
|
|
68
|
+
- Support the `maxLength` websocket-driver option
|
|
69
|
+
- Make the client emit `error` events on network errors
|
|
70
|
+
|
|
71
|
+
### 0.7.0 / 2013-09-09
|
|
72
|
+
|
|
73
|
+
- Allow the server to send custom headers with EventSource responses
|
|
74
|
+
|
|
75
|
+
### 0.6.1 / 2013-07-05
|
|
76
|
+
|
|
77
|
+
- Add `ca` option to the client for specifying certificate authorities
|
|
78
|
+
- Start the server driver asynchronously so that `onopen` handlers can be added
|
|
79
|
+
|
|
80
|
+
### 0.6.0 / 2013-05-12
|
|
81
|
+
|
|
82
|
+
- Add support for custom headers
|
|
83
|
+
|
|
84
|
+
### 0.5.0 / 2013-05-05
|
|
85
|
+
|
|
86
|
+
- Extract the protocol handlers into the `websocket-driver` library
|
|
87
|
+
- Support the Node streaming API
|
|
88
|
+
|
|
89
|
+
### 0.4.4 / 2013-02-14
|
|
90
|
+
|
|
91
|
+
- Emit the `close` event if TCP is closed before CLOSE frame is acked
|
|
92
|
+
|
|
93
|
+
### 0.4.3 / 2012-07-09
|
|
94
|
+
|
|
95
|
+
- Add `Connection: close` to EventSource response
|
|
96
|
+
- Handle situations where `request.socket` is undefined
|
|
97
|
+
|
|
98
|
+
### 0.4.2 / 2012-04-06
|
|
99
|
+
|
|
100
|
+
- Add WebSocket error code `1011`.
|
|
101
|
+
- Handle URLs with no path correctly by sending `GET /`
|
|
102
|
+
|
|
103
|
+
### 0.4.1 / 2012-02-26
|
|
104
|
+
|
|
105
|
+
- Treat anything other than a `Buffer` as a string when calling `send()`
|
|
106
|
+
|
|
107
|
+
### 0.4.0 / 2012-02-13
|
|
108
|
+
|
|
109
|
+
- Add `ping()` method to server-side `WebSocket` and `EventSource`
|
|
110
|
+
- Buffer `send()` calls until the draft-76 handshake is complete
|
|
111
|
+
- Fix HTTPS problems on Node 0.7
|
|
112
|
+
|
|
113
|
+
### 0.3.1 / 2012-01-16
|
|
114
|
+
|
|
115
|
+
- Call `setNoDelay(true)` on `net.Socket` objects to reduce latency
|
|
116
|
+
|
|
117
|
+
### 0.3.0 / 2012-01-13
|
|
118
|
+
|
|
119
|
+
- Add support for `EventSource` connections
|
|
120
|
+
|
|
121
|
+
### 0.2.0 / 2011-12-21
|
|
122
|
+
|
|
123
|
+
- Add support for `Sec-WebSocket-Protocol` negotiation
|
|
124
|
+
- Support `hixie-76` close frames and 75/76 ignored segments
|
|
125
|
+
- Improve performance of HyBi parsing/framing functions
|
|
126
|
+
- Decouple parsers from TCP and reduce write volume
|
|
127
|
+
|
|
128
|
+
### 0.1.2 / 2011-12-05
|
|
129
|
+
|
|
130
|
+
- Detect closed sockets on the server side when TCP connection breaks
|
|
131
|
+
- Make `hixie-76` sockets work through HAProxy
|
|
132
|
+
|
|
133
|
+
### 0.1.1 / 2011-11-30
|
|
134
|
+
|
|
135
|
+
- Fix `addEventListener()` interface methods
|
|
136
|
+
|
|
137
|
+
### 0.1.0 / 2011-11-27
|
|
138
|
+
|
|
139
|
+
- Initial release, based on WebSocket components from Faye
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
0.1.7 / 2015-07-28
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
* Fixed regression with escaped round brackets and matching groups.
|
|
5
|
+
|
|
6
|
+
0.1.6 / 2015-06-19
|
|
7
|
+
==================
|
|
8
|
+
|
|
9
|
+
* Replace `index` feature by outputting all parameters, unnamed and named.
|
|
10
|
+
|
|
11
|
+
0.1.5 / 2015-05-08
|
|
12
|
+
==================
|
|
13
|
+
|
|
14
|
+
* Add an index property for position in match result.
|
|
15
|
+
|
|
16
|
+
0.1.4 / 2015-03-05
|
|
17
|
+
==================
|
|
18
|
+
|
|
19
|
+
* Add license information
|
|
20
|
+
|
|
21
|
+
0.1.3 / 2014-07-06
|
|
22
|
+
==================
|
|
23
|
+
|
|
24
|
+
* Better array support
|
|
25
|
+
* Improved support for trailing slash in non-ending mode
|
|
26
|
+
|
|
27
|
+
0.1.0 / 2014-03-06
|
|
28
|
+
==================
|
|
29
|
+
|
|
30
|
+
* add options.end
|
|
31
|
+
|
|
32
|
+
0.0.2 / 2013-02-10
|
|
33
|
+
==================
|
|
34
|
+
|
|
35
|
+
* Update to match current express
|
|
36
|
+
* add .license property to component.json
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
### 0.7.4 / 2020-05-22
|
|
2
|
+
|
|
3
|
+
- Avoid crashing if `process.version` does not contain any digits
|
|
4
|
+
- Emit `ping` and `pong` events from the `Server` driver
|
|
5
|
+
- Require http-parser-js >=0.5.1 which fixes the bug we addressed in 0.7.3
|
|
6
|
+
|
|
7
|
+
### 0.7.3 / 2019-06-13
|
|
8
|
+
|
|
9
|
+
- Cap version of http-parser-js below 0.4.11, which introduced a bug that
|
|
10
|
+
prevents us from handling messages that are part of the same input buffer as
|
|
11
|
+
the handshake response if chunked encoding is specified
|
|
12
|
+
|
|
13
|
+
### 0.7.2 / 2019-06-13
|
|
14
|
+
|
|
15
|
+
(This version was pulled due to an error when publishing)
|
|
16
|
+
|
|
17
|
+
### 0.7.1 / 2019-06-10
|
|
18
|
+
|
|
19
|
+
- Catch any exceptions produced while generating a handshake response and send a
|
|
20
|
+
`400 Bad Request` response to the client
|
|
21
|
+
- Pick the RFC-6455 protocol version if the request contains any of the headers
|
|
22
|
+
used by that version
|
|
23
|
+
- Use the `Buffer.alloc()` and `Buffer.from()` functions instead of the unsafe
|
|
24
|
+
`Buffer()` constructor
|
|
25
|
+
- Handle errors encountered while handling malformed draft-76 requests
|
|
26
|
+
- Change license from MIT to Apache 2.0
|
|
27
|
+
|
|
28
|
+
### 0.7.0 / 2017-09-11
|
|
29
|
+
|
|
30
|
+
- Add `ping` and `pong` to the set of events users can listen to
|
|
31
|
+
- Replace the bindings to Node's HTTP parser with `http-parser-js`
|
|
32
|
+
|
|
33
|
+
### 0.6.5 / 2016-05-20
|
|
34
|
+
|
|
35
|
+
- Don't mutate buffers passed in by the application when masking
|
|
36
|
+
|
|
37
|
+
### 0.6.4 / 2016-01-07
|
|
38
|
+
|
|
39
|
+
- If a number is given as input for a frame payload, send it as a string
|
|
40
|
+
|
|
41
|
+
### 0.6.3 / 2015-11-06
|
|
42
|
+
|
|
43
|
+
- Reject draft-76 handshakes if their Sec-WebSocket-Key headers are invalid
|
|
44
|
+
- Throw a more helpful error if a client is created with an invalid URL
|
|
45
|
+
|
|
46
|
+
### 0.6.2 / 2015-07-18
|
|
47
|
+
|
|
48
|
+
- When the peer sends a close frame with no error code, emit 1000
|
|
49
|
+
|
|
50
|
+
### 0.6.1 / 2015-07-13
|
|
51
|
+
|
|
52
|
+
- Use the `buffer.{read,write}UInt{16,32}BE` methods for reading/writing numbers
|
|
53
|
+
to buffers rather than including duplicate logic for this
|
|
54
|
+
|
|
55
|
+
### 0.6.0 / 2015-07-08
|
|
56
|
+
|
|
57
|
+
- Allow the parser to recover cleanly if event listeners raise an error
|
|
58
|
+
- Add a `pong` method for sending unsolicited pong frames
|
|
59
|
+
|
|
60
|
+
### 0.5.4 / 2015-03-29
|
|
61
|
+
|
|
62
|
+
- Don't emit extra close frames if we receive a close frame after we already
|
|
63
|
+
sent one
|
|
64
|
+
- Fail the connection when the driver receives an invalid
|
|
65
|
+
`Sec-WebSocket-Extensions` header
|
|
66
|
+
|
|
67
|
+
### 0.5.3 / 2015-02-22
|
|
68
|
+
|
|
69
|
+
- Don't treat incoming data as WebSocket frames if a client driver is closed
|
|
70
|
+
before receiving the server handshake
|
|
71
|
+
|
|
72
|
+
### 0.5.2 / 2015-02-19
|
|
73
|
+
|
|
74
|
+
- Fix compatibility with the HTTP parser on io.js
|
|
75
|
+
- Use `websocket-extensions` to make sure messages and close frames are kept in
|
|
76
|
+
order
|
|
77
|
+
- Don't emit multiple `error` events
|
|
78
|
+
|
|
79
|
+
### 0.5.1 / 2014-12-18
|
|
80
|
+
|
|
81
|
+
- Don't allow drivers to be created with unrecognized options
|
|
82
|
+
|
|
83
|
+
### 0.5.0 / 2014-12-13
|
|
84
|
+
|
|
85
|
+
- Support protocol extensions via the websocket-extensions module
|
|
86
|
+
|
|
87
|
+
### 0.4.0 / 2014-11-08
|
|
88
|
+
|
|
89
|
+
- Support connection via HTTP proxies using `CONNECT`
|
|
90
|
+
|
|
91
|
+
### 0.3.6 / 2014-10-04
|
|
92
|
+
|
|
93
|
+
- It is now possible to call `close()` before `start()` and close the driver
|
|
94
|
+
|
|
95
|
+
### 0.3.5 / 2014-07-06
|
|
96
|
+
|
|
97
|
+
- Don't hold references to frame buffers after a message has been emitted
|
|
98
|
+
- Make sure that `protocol` and `version` are exposed properly by the TCP driver
|
|
99
|
+
|
|
100
|
+
### 0.3.4 / 2014-05-08
|
|
101
|
+
|
|
102
|
+
- Don't hold memory-leaking references to I/O buffers after they have been
|
|
103
|
+
parsed
|
|
104
|
+
|
|
105
|
+
### 0.3.3 / 2014-04-24
|
|
106
|
+
|
|
107
|
+
- Correct the draft-76 status line reason phrase
|
|
108
|
+
|
|
109
|
+
### 0.3.2 / 2013-12-29
|
|
110
|
+
|
|
111
|
+
- Expand `maxLength` to cover sequences of continuation frames and
|
|
112
|
+
`draft-{75,76}`
|
|
113
|
+
- Decrease default maximum frame buffer size to 64MB
|
|
114
|
+
- Stop parsing when the protocol enters a failure mode, to save CPU cycles
|
|
115
|
+
|
|
116
|
+
### 0.3.1 / 2013-12-03
|
|
117
|
+
|
|
118
|
+
- Add a `maxLength` option to limit allowed frame size
|
|
119
|
+
- Don't pre-allocate a message buffer until the whole frame has arrived
|
|
120
|
+
- Fix compatibility with Node v0.11 `HTTPParser`
|
|
121
|
+
|
|
122
|
+
### 0.3.0 / 2013-09-09
|
|
123
|
+
|
|
124
|
+
- Support client URLs with Basic Auth credentials
|
|
125
|
+
|
|
126
|
+
### 0.2.2 / 2013-07-05
|
|
127
|
+
|
|
128
|
+
- No functional changes, just updates to package.json
|
|
129
|
+
|
|
130
|
+
### 0.2.1 / 2013-05-17
|
|
131
|
+
|
|
132
|
+
- Export the isSecureRequest() method since faye-websocket relies on it
|
|
133
|
+
- Queue sent messages in the client's initial state
|
|
134
|
+
|
|
135
|
+
### 0.2.0 / 2013-05-12
|
|
136
|
+
|
|
137
|
+
- Add API for setting and reading headers
|
|
138
|
+
- Add Driver.server() method for getting a driver for TCP servers
|
|
139
|
+
|
|
140
|
+
### 0.1.0 / 2013-05-04
|
|
141
|
+
|
|
142
|
+
- First stable release
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# HTTP Parser
|
|
2
|
+
|
|
3
|
+
## 0.4.4
|
|
4
|
+
|
|
5
|
+
Made 'maxHeaderSize' configurable.
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
// Monkey patch before you require http for the first time.
|
|
9
|
+
process.binding('http_parser').HTTPParser = require('http-parser-js').HTTPParser;
|
|
10
|
+
require('http-parser-js').HTTPParser.maxHeaderSize = 1024 * 1024; // 1MB instead of 80kb
|
|
11
|
+
|
|
12
|
+
var http = require('http');
|
|
13
|
+
// ...
|
|
14
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
### 0.1.4 / 2020-06-02
|
|
2
|
+
|
|
3
|
+
- Remove a ReDoS vulnerability in the header parser (CVE-2020-7662, reported by
|
|
4
|
+
Robert McLaughlin)
|
|
5
|
+
- Change license from MIT to Apache 2.0
|
|
6
|
+
|
|
7
|
+
### 0.1.3 / 2017-11-11
|
|
8
|
+
|
|
9
|
+
- Accept extension names and parameters including uppercase letters
|
|
10
|
+
- Handle extension names that clash with `Object.prototype` properties
|
|
11
|
+
|
|
12
|
+
### 0.1.2 / 2017-09-10
|
|
13
|
+
|
|
14
|
+
- Catch synchronous exceptions thrown when calling an extension
|
|
15
|
+
- Fix race condition caused when a message is pushed after a cell has stopped
|
|
16
|
+
due to an error
|
|
17
|
+
- Fix failure of `close()` to return if a message that's queued after one that
|
|
18
|
+
produces an error never finishes being processed
|
|
19
|
+
|
|
20
|
+
### 0.1.1 / 2015-02-19
|
|
21
|
+
|
|
22
|
+
- Prevent sessions being closed before they have finished processing messages
|
|
23
|
+
- Add a callback to `Extensions.close()` so the caller can tell when it's safe
|
|
24
|
+
to close the socket
|
|
25
|
+
|
|
26
|
+
### 0.1.0 / 2014-12-12
|
|
27
|
+
|
|
28
|
+
- Initial release
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-web-worldmap",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.40.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",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"keywords": [
|
|
25
25
|
"node-red",
|
|
26
26
|
"map",
|
|
27
|
-
"world"
|
|
27
|
+
"world",
|
|
28
|
+
"tak"
|
|
28
29
|
],
|
|
29
30
|
"node-red": {
|
|
30
31
|
"version": ">=1.0.0",
|
package/worldmap/worldmap.js
CHANGED
|
@@ -18,7 +18,7 @@ var menuOpen = false;
|
|
|
18
18
|
var clusterAt = 0;
|
|
19
19
|
var maxage = 900; // default max age of icons on map in seconds - cleared after 10 mins
|
|
20
20
|
var baselayername = "OSM grey"; // Default base layer OSM but uniform grey
|
|
21
|
-
var pagefoot = " © DCJ
|
|
21
|
+
var pagefoot = " © DCJ 2023"
|
|
22
22
|
var inIframe = false;
|
|
23
23
|
var showUserMenu = true;
|
|
24
24
|
var showLayerMenu = true;
|
|
@@ -117,12 +117,23 @@ var handleData = function(data) {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
if (data.command) { doCommand(data.command); delete data.command; }
|
|
120
|
+
|
|
121
|
+
// handle raw geojson type msg
|
|
120
122
|
if (data.hasOwnProperty("type") && data.type.indexOf("Feature") === 0) {
|
|
121
123
|
if (data.hasOwnProperty('properties') && data.properties.hasOwnProperty('title')) {
|
|
122
124
|
doGeojson(data.properties.title,data)
|
|
123
125
|
}
|
|
124
126
|
else { doGeojson("geojson",data); }
|
|
125
127
|
}
|
|
128
|
+
// handle TAK json (from tak-ingest node or fastxml node)
|
|
129
|
+
else if (data.hasOwnProperty("event") && data.event.hasOwnProperty("point")) {
|
|
130
|
+
doTAKjson(data.event);
|
|
131
|
+
}
|
|
132
|
+
// handle TAK json (from multicast Protobuf)
|
|
133
|
+
else if (data.hasOwnProperty("cotEvent") && data.cotEvent.hasOwnProperty("lat") && data.cotEvent.hasOwnProperty("lon")) {
|
|
134
|
+
doTAKMCjson(data.cotEvent);
|
|
135
|
+
}
|
|
136
|
+
// handle default worldmap json msg
|
|
126
137
|
else if (data.hasOwnProperty("name")) { setMarker(data); }
|
|
127
138
|
else {
|
|
128
139
|
if (JSON.stringify(data) !== '{}') {
|
|
@@ -136,7 +147,13 @@ var handleData = function(data) {
|
|
|
136
147
|
|
|
137
148
|
window.onunload = function() { if (ws) ws.close(); }
|
|
138
149
|
|
|
139
|
-
var
|
|
150
|
+
var customTopoLayer = L.geoJson(null, {clickable:false, style: {color:"blue", weight:2, fillColor:"#cf6", fillOpacity:0.04}});
|
|
151
|
+
layers["_countries"] = omnivore.topojson('images/world-50m-flat.json',null,customTopoLayer);
|
|
152
|
+
overlays["countries"] = layers["_countries"];
|
|
153
|
+
|
|
154
|
+
var onoffline = function() { if (!navigator.onLine) {
|
|
155
|
+
map.addLayer(overlays["countries"]);
|
|
156
|
+
} }
|
|
140
157
|
|
|
141
158
|
document.addEventListener ("keydown", function (ev) {
|
|
142
159
|
// Set Ctl-Alt-3 to switch to 3d view
|
|
@@ -1205,7 +1222,6 @@ var addOverlays = function(overlist) {
|
|
|
1205
1222
|
sendDrawing(n);
|
|
1206
1223
|
});
|
|
1207
1224
|
}
|
|
1208
|
-
|
|
1209
1225
|
}
|
|
1210
1226
|
|
|
1211
1227
|
// Add the countries (world-110m) for offline use
|
|
@@ -2910,3 +2926,59 @@ function doGeojson(n,g,l,o) {
|
|
|
2910
2926
|
layers[lay].addLayer(markers[n]);
|
|
2911
2927
|
map.addLayer(layers[lay]);
|
|
2912
2928
|
}
|
|
2929
|
+
|
|
2930
|
+
// handle TAK messages from TAK server tcp - XML->JSON
|
|
2931
|
+
function doTAKjson(p) {
|
|
2932
|
+
// console.log("TAK event",p);
|
|
2933
|
+
if (p.type.indexOf('a') === 0) {
|
|
2934
|
+
var d = {};
|
|
2935
|
+
d.lat = Number(p.point.lat);
|
|
2936
|
+
d.lon = Number(p.point.lon);
|
|
2937
|
+
d.group = p.detail?.__group?.name;
|
|
2938
|
+
d.role = p.detail?.__group?.role;
|
|
2939
|
+
d.type = p.type;
|
|
2940
|
+
d.uid = p.uid;
|
|
2941
|
+
d.name = p.detail?.contact?.callsign || p.uid;
|
|
2942
|
+
d.hdg = p.detail?.track?.course;
|
|
2943
|
+
d.speed = p.detail?.track?.speed;
|
|
2944
|
+
var i = d.type.split('-').join('').toUpperCase();
|
|
2945
|
+
if (i[0] === 'A') { i = 'S' + i.substr(1,2) + 'P' + i.substr(3); }
|
|
2946
|
+
d.SIDC = (i + '------------').substr(0,12);
|
|
2947
|
+
d.timestamp = Date.parse(p.time);
|
|
2948
|
+
d.ttl = Date.parse(p.stale);
|
|
2949
|
+
// d.now = Date.now();
|
|
2950
|
+
d.alt = Number(p.point.hae) || 9999999;
|
|
2951
|
+
setMarker(d);
|
|
2952
|
+
}
|
|
2953
|
+
else {
|
|
2954
|
+
console.log("Skip TAK type",p.type);
|
|
2955
|
+
}
|
|
2956
|
+
}
|
|
2957
|
+
|
|
2958
|
+
// handle TAK messages from TAK Multicast - Protobuf->JSON
|
|
2959
|
+
function doTAKMCjson(p) {
|
|
2960
|
+
// console.log("TAK Multicast event",p);
|
|
2961
|
+
if (p.type.indexOf('a') === 0) {
|
|
2962
|
+
var d = {};
|
|
2963
|
+
d.lat = p.lat;
|
|
2964
|
+
d.lon = p.lon;
|
|
2965
|
+
d.group = p.detail?.group?.name;
|
|
2966
|
+
d.role = p.detail?.group?.role;
|
|
2967
|
+
d.type = p.type;
|
|
2968
|
+
d.uid = p.uid;
|
|
2969
|
+
d.name = p.detail?.contact?.callsign || p.uid;
|
|
2970
|
+
d.hdg = p.detail?.track?.course;
|
|
2971
|
+
d.speed = p.detail?.track?.speed;
|
|
2972
|
+
var i = d.type.split('-').join('').toUpperCase();
|
|
2973
|
+
if (i[0] === 'A') { i = 'S' + i.substr(1,2) + 'P' + i.substr(3); }
|
|
2974
|
+
d.SIDC = (i + '------------').substr(0,12);
|
|
2975
|
+
d.timestamp = Number(p.sendTime);
|
|
2976
|
+
d.ttl = Number(p.staleTime);
|
|
2977
|
+
// d.now = Date.now();
|
|
2978
|
+
d.alt = p.hae || 9999999;
|
|
2979
|
+
setMarker(d);
|
|
2980
|
+
}
|
|
2981
|
+
else {
|
|
2982
|
+
console.log("Skip TAK type",p.type);
|
|
2983
|
+
}
|
|
2984
|
+
}
|
package/worldmap.html
CHANGED
|
@@ -146,7 +146,7 @@ If <i>Web Path</i> is left empty, then by default <code>⌘⇧m</code> - <code>c
|
|
|
146
146
|
<p>Icons of type <i>plane</i>, <i>ship</i>, <i>car</i>, <i>uav</i> or <i>arrow</i> will use built in SVG icons that align to the
|
|
147
147
|
<code>bearing</code> value.</p>
|
|
148
148
|
<p>Font Awesome (<a href="https://fontawesome.com/v4.7.0/icons/" target="_new">fa-icons 4.7</a>) can also be used, as can
|
|
149
|
-
NATO symbology codes (<a href="https://spatialillusions.com/unitgenerator/">SIDC</a>), or <a href="https://github.com/dceejay/RedMap/blob/master/emojilist.md" target="_new">:emoji name:</a>,
|
|
149
|
+
NATO symbology codes (<a href="https://www.spatialillusions.com/unitgenerator-legacy/">SIDC</a>), or <a href="https://github.com/dceejay/RedMap/blob/master/emojilist.md" target="_new">:emoji name:</a>,
|
|
150
150
|
or the url of a small icon image (32x32)</p>
|
|
151
151
|
<p>See the <a href="https://www.npmjs.com/package/node-red-contrib-web-worldmap" target="_new">README</a> for further
|
|
152
152
|
details and examples of icons and commands for drawing <b>lines</b> and <b>areas</b>, and to <b>add layers</b> and
|
|
@@ -312,7 +312,7 @@ If <i>Web Path</i> is left empty, then by default <code>⌘⇧m</code> - <code>c
|
|
|
312
312
|
<p>Icons of type <i>plane</i>, <i>ship</i>, <i>car</i>, <i>uav</i> or <i>arrow</i> will use built in SVG icons that align to the
|
|
313
313
|
<code>bearing</code> value.</p>
|
|
314
314
|
<p>Font Awesome (<a href="https://fontawesome.com/v4.7.0/icons/" target="_new">fa-icons 4.7</a>) can also be used, as can
|
|
315
|
-
NATO symbology codes (<a href="https://spatialillusions.com/unitgenerator/">SIDC</a>), or <a href="https://github.com/dceejay/RedMap/blob/master/emojilist.md" target="_new">:emoji name:</a>,
|
|
315
|
+
NATO symbology codes (<a href="https://www.spatialillusions.com/unitgenerator-legacy/">SIDC</a>), or <a href="https://github.com/dceejay/RedMap/blob/master/emojilist.md" target="_new">:emoji name:</a>,
|
|
316
316
|
or the url of a small icon image (32x32)</p>
|
|
317
317
|
<p>See the <a href="https://www.npmjs.com/package/node-red-contrib-web-worldmap" target="_new">README</a> for further
|
|
318
318
|
details and examples of icons and commands for drawing <b>lines</b> and <b>areas</b>, and to <b>add layers</b> and
|