node-red-contrib-web-worldmap 5.1.0 → 5.1.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 CHANGED
@@ -1,5 +1,6 @@
1
1
  ### Change Log for Node-RED Worldmap
2
2
 
3
+ - v5.1.1 - Fix CoT inline image.
3
4
  - v5.1.0 - Let special icons be sizeable using iconSize property.
4
5
  - v5.0.9 - Slight tidy on flags, bump turf dep.
5
6
  - v5.0.8 - Fix flag handling for SIDC 2525D, add example.
package/README.md CHANGED
@@ -13,6 +13,7 @@ Feel free to [![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%
13
13
 
14
14
  ### Updates
15
15
 
16
+ - v5.1.1 - Fix CoT inline image.
16
17
  - v5.1.0 - Let special icons be sizeable using iconSize property.
17
18
  - v5.0.9 - Slight tidy on flags, bump turf dep.
18
19
  - v5.0.8 - Fix flag handling for SIDC 2525D, add example.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-web-worldmap",
3
- "version": "5.1.0",
3
+ "version": "5.1.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": "~7.2.0",
@@ -1827,7 +1827,7 @@ function setMarker(data) {
1827
1827
  var siz = 32;
1828
1828
  var sizc = 16;
1829
1829
  if (data?.iconSize && !isNaN(data.iconSize)) {
1830
- if (data.iconSize >= 8 && data.iconSize <= 256) {
1830
+ if (data.iconSize >= 8 && data.iconSize <= 512) {
1831
1831
  siz = data.iconSize;
1832
1832
  sizc = Math.round(siz/2);
1833
1833
  }
@@ -3384,6 +3384,10 @@ function doTAKjson(p) {
3384
3384
  d.alt = Number(p.point.hae) || 9999999;
3385
3385
  if (d?.alt && parseInt(d.alt) == 9999999) { delete d.alt; }
3386
3386
  else { d.alt = d.alt + "m"; }
3387
+ if (p?.detail?.image && p?.detail?.image['#text']) {
3388
+ d.image = p?.detail?.image['#text'];
3389
+ d.image = '<img alt="" src="data:image/webp;base64,'+d.image+'" width="240px"/>';
3390
+ }
3387
3391
  setMarker(d);
3388
3392
  }
3389
3393
  else {