node-red-contrib-web-worldmap 2.31.1 → 2.31.2

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
+ - v2.31.2 = Fix more antimeridian crossing wrinkles. Issue #216
3
4
  - v2.31.1 - Fix missing type property for drawings, and pass back feedback value. Add route distance. Issue #213, Issue #212, PR #215
4
5
  - v2.31.0 - Better handling of KML files. Issue #211
5
6
 
package/README.md CHANGED
@@ -11,6 +11,7 @@ map web page for plotting "things" on.
11
11
 
12
12
  ### Updates
13
13
 
14
+ - v2.31.2 = Fix more antimeridian crossing wrinkles. Issue #216
14
15
  - v2.31.1 - Fix missing type property for drawings, and pass back feedback value. Add route distance. Issue #213, Issue #212, PR #215
15
16
  - v2.31.0 - Better handling of KML files. Issue #211
16
17
  - v2.30.3 - Fix for iframe height. Issue #210
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-web-worldmap",
3
- "version": "2.31.1",
3
+ "version": "2.31.2",
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",
@@ -1475,7 +1475,11 @@ function setMarker(data) {
1475
1475
  if (!data.hasOwnProperty("weight")) { opt.weight = 3; } //Standard settings different for lines
1476
1476
  if (!data.hasOwnProperty("opacity")) { opt.opacity = 0.8; }
1477
1477
  var greatc = L.Polyline.Arc(data.greatcircle[0], data.greatcircle[1], opt);
1478
- var aml = new L.Wrapped.Polyline(greatc._latlngs, opt);
1478
+ var gcp = greatc._latlngs.map(function(x) {
1479
+ if (x.lng > 180) { x.lng -= 360; }
1480
+ return x;
1481
+ });
1482
+ var aml = new L.Wrapped.Polyline(gcp, opt);
1479
1483
 
1480
1484
  polygons[data.name] = rightmenu(aml);
1481
1485
  if (data.hasOwnProperty("fit") && data.fit === true) {