@tak-ps/node-cot 2.2.0 → 2.2.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 +4 -0
- package/package.json +1 -1
- package/src/util.js +2 -2
- package/src/xml.js +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/util.js
CHANGED
|
@@ -27,13 +27,13 @@ export default class Util {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* Return an event.
|
|
30
|
+
* Return an event.detail object with as many defaults as possible
|
|
31
31
|
*
|
|
32
32
|
* @param {String} [callsign=UNKNOWN] Display Callsign
|
|
33
33
|
*
|
|
34
34
|
* @returns {Object}
|
|
35
35
|
*/
|
|
36
|
-
static
|
|
36
|
+
static cot_event_detail(callsign = 'UNKNOWN') {
|
|
37
37
|
return {
|
|
38
38
|
contact: {
|
|
39
39
|
_attributes: { callsign }
|
package/src/xml.js
CHANGED
|
@@ -43,7 +43,7 @@ export default class XMLCot {
|
|
|
43
43
|
event: {
|
|
44
44
|
_attributes: Util.cot_event_attr(feature.properties.type || 'a-f-G', feature.properties.how || 'm-g'),
|
|
45
45
|
point: Util.cot_point(),
|
|
46
|
-
|
|
46
|
+
detail: Util.cot_event_detail(feature.properties.callsign)
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
|