fix circle/ellipse accuracy
This commit is contained in:
parent
0fa462c4c0
commit
84307ebd19
@ -1,5 +1,6 @@
|
||||
### Change Log for Node-RED Worldmap
|
||||
|
||||
- v2.24.1 - Fix ellipse accuracy.
|
||||
- v2.24.0 - Add greatcircle option, fix non default httpRoot. Issue #193
|
||||
- v2.23.5 - Fix addtoheatmap. Issue #192
|
||||
- v2.23.4 - Fix opacity of area borders
|
||||
|
@ -11,6 +11,7 @@ map web page for plotting "things" on.
|
||||
|
||||
### Updates
|
||||
|
||||
- v2.24.1 - Fix ellipse accuracy
|
||||
- v2.24.0 - Add greatcircle option, fix non default httpRoot. Issue #193
|
||||
- v2.23.5 - Fix addtoheatmap. Issue #192
|
||||
- v2.23.4 - Fix opacity of area borders
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-contrib-web-worldmap",
|
||||
"version": "2.24.0",
|
||||
"version": "2.24.1",
|
||||
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||
"dependencies": {
|
||||
"@turf/bezier-spline": "~6.5.0",
|
||||
|
@ -1465,7 +1465,8 @@ function setMarker(data) {
|
||||
if (data.hasOwnProperty("lat") && data.hasOwnProperty("lon")) {
|
||||
var polycirc;
|
||||
if (Array.isArray(data.radius)) {
|
||||
polycirc = L.ellipse(new L.LatLng((data.lat*1), (data.lon*1)), [data.radius[0]*Math.cos(data.lat*Math.PI/180), data.radius[1]], data.tilt || 0, opt);
|
||||
//polycirc = L.ellipse(new L.LatLng((data.lat*1), (data.lon*1)), [data.radius[0]*Math.cos(data.lat*Math.PI/180), data.radius[1]], data.tilt || 0, opt);
|
||||
polycirc = L.ellipse(new L.LatLng((data.lat*1), (data.lon*1)), [data.radius[0], data.radius[1]], data.tilt || 0, opt);
|
||||
}
|
||||
else {
|
||||
polycirc = L.circle(new L.LatLng((data.lat*1), (data.lon*1)), data.radius*1, opt);
|
||||
|
Loading…
Reference in New Issue
Block a user