tweak greatcircle readme
This commit is contained in:
parent
80e944afa8
commit
0fa462c4c0
@ -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
|
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.
|
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.
|
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) {
|
if (data.hasOwnProperty("greatcircle") && Array.isArray(data.greatcircle) && data.greatcircle.length === 2) {
|
||||||
delete opt.fill;
|
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("weight")) { opt.weight = 3; } //Standard settings different for lines
|
||||||
if (!data.hasOwnProperty("opacity")) { opt.opacity = 0.8; }
|
if (!data.hasOwnProperty("opacity")) { opt.opacity = 0.8; }
|
||||||
var greatc = L.Polyline.Arc(data.greatcircle[0], data.greatcircle[1], opt);
|
var greatc = L.Polyline.Arc(data.greatcircle[0], data.greatcircle[1], opt);
|
||||||
|
Loading…
Reference in New Issue
Block a user