better smoothing for greatcircles

pull/197/head
Dave Conway-Jones 3 years ago
parent 0b259013bb
commit 71111f8c8a
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF

@ -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.

@ -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.

@ -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);

Loading…
Cancel
Save