tweak greatcircle readme

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

@ -134,7 +134,7 @@ If the payload also includes a property `fit:true` the map will zoom to fit the
Finally if a **greatcircle** property is set containing an array of two coordinates then an arc
following the great circle between the two co-ordinates is plotted.
msg.payload = {name:"GC1", greatcircle:[ [51.464,0], [25.76,-80.18] ] }
msg.payload = {name:"GC1", color:"#ff00ff", greatcircle:[ [51.464,0], [25.76,-80.18] ] }
There are extra optional properties you can specify - see Options below.

@ -1446,7 +1446,7 @@ function setMarker(data) {
}
if (data.hasOwnProperty("greatcircle") && Array.isArray(data.greatcircle) && data.greatcircle.length === 2) {
delete opt.fill;
opt.vertices = 500;
opt.vertices = opt.vertices || 100;
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);

Loading…
Cancel
Save