better smoothing for greatcircles

This commit is contained in:
Dave Conway-Jones 2022-02-24 21:28:54 +00:00
parent 0b259013bb
commit 71111f8c8a
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
3 changed files with 3 additions and 5 deletions

View File

@ -1,6 +1,6 @@
### Change Log for Node-RED Worldmap
- v2.27.2 - Try to handle greatcircles crossing antimeridian
- v2.27.3 - Try to handle greatcircles crossing antimeridian
- v2.27.1 - Reload existing markers for late joiners
- v2.26.1 - Add QTH/Maidenhead option also
- v2.26.0 - Add UTM and MGRS to coordinate display options.

View File

@ -11,7 +11,7 @@ map web page for plotting "things" on.
### Updates
- v2.27.2 - Try to handle greatcircles crossing antimeridian
- v2.27.3 - Try to handle greatcircles crossing antimeridian
- v2.27.1 - Reload existing markers for late joiners
- v2.26.1 - Add QTH/Maidenhead option also
- v2.26.0 - Add UTM and MGRS to coordinate display options.

View File

@ -1441,12 +1441,10 @@ function setMarker(data) {
}
if (data.hasOwnProperty("greatcircle") && Array.isArray(data.greatcircle) && data.greatcircle.length === 2) {
delete opt.fill;
//opt.vertices = opt.vertices || 100;
opt.vertices = opt.vertices || 20;
if (!data.hasOwnProperty("weight")) { opt.weight = 3; } //Standard settings different for lines
if (!data.hasOwnProperty("opacity")) { opt.opacity = 0.8; }
var greatc = L.Polyline.Arc(data.greatcircle[0], data.greatcircle[1], opt);
// // opt.smoothFactor= 1;
// // opt.noWrap = true;
var aml = new L.Wrapped.Polyline(greatc._latlngs, opt);
polygons[data.name] = rightmenu(aml);