Fix geojson multiline fill mistake

This commit is contained in:
Dave Conway-Jones 2022-01-12 17:05:44 +00:00
parent 19def98cf8
commit 49198b79d2
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
5 changed files with 11 additions and 7 deletions

View File

@ -1,5 +1,6 @@
### Change Log for Node-RED Worldmap
- v2.24.3 - Fix geojson incorrect fill.
- v2.24.2 - Changes to drawing colours to be more visible.
- v2.24.1 - Fix ellipse accuracy.
- v2.24.0 - Add greatcircle option, fix non default httpRoot. Issue #193
@ -8,7 +9,7 @@
- v2.23.3 - Fix initial load of maps
- v2.23.2 - Add convex-hull example
- v2.23.1 - Fix saving of custom map layer
- v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188.
- v2.23.0 - Give logo an id so it can be overridden by toplogo command. PR #188.
- v2.22.3 - Don't show empty popup for geojson object. Issue #186. Add wobble to null island.
- v2.22.2 - Be more tolerant of speed string types

View File

@ -11,6 +11,7 @@ map web page for plotting "things" on.
### Updates
- v2.24.3 - Fix geojson incorrect fill.
- v2.24.2 - Changes to drawing colours to be more visible.
- v2.24.1 - Fix ellipse accuracy
- v2.24.0 - Add greatcircle option, fix non default httpRoot. Issue #193
@ -19,7 +20,7 @@ map web page for plotting "things" on.
- v2.23.3 - Fix initial load of maps
- v2.23.2 - Add convex-hull example
- v2.23.1 - Fix saving of custom map layer
- v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188.
- v2.23.0 - Give logo an id so it can be overridden by toplogo command. PR #188.
- v2.22.3 - Don't show empty popup for geojson object. Issue #186. Add wobble to null island.
- v2.22.2 - Be more tolerant of speed string types
- v2.22.0 - Separate out layer events in worldmap in

View File

@ -1,6 +1,6 @@
{
"name": "node-red-contrib-web-worldmap",
"version": "2.24.2",
"version": "2.24.3",
"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",

View File

@ -213,7 +213,8 @@ a {
.wm-yellow { color: #FFFF40; }
.wm-black { color: #333333; }
.wm-white { color: #EEEEEE; }
.wm-magenta { color: #F020F0; }
.wm-magenta { color: #F040F0; }
.wm-cyan { color: #40F0F0; }
.legend {
padding: 6px 8px;

View File

@ -926,10 +926,11 @@ var addOverlays = function(overlist) {
var blueButton = L.easyButton('fa-square wm-blue', function(btn) { changeDrawColour("#4040F0"); })
var greenButton = L.easyButton('fa-square wm-green', function(btn) { changeDrawColour("#40D040"); })
var yellowButton = L.easyButton('fa-square wm-yellow', function(btn) { changeDrawColour("#FFFF40"); })
var magentaButton = L.easyButton('fa-square wm-magenta', function(btn) { changeDrawColour("#F020F0"); })
var cyanButton = L.easyButton('fa-square wm-cyan', function(btn) { changeDrawColour("#40F0F0"); })
var magentaButton = L.easyButton('fa-square wm-magenta', function(btn) { changeDrawColour("#F040F0"); })
var blackButton = L.easyButton('fa-square wm-black', function(btn) { changeDrawColour("#000000"); })
var whiteButton = L.easyButton('fa-square wm-white', function(btn) { changeDrawColour("#EEEEEE"); })
colorControl = L.easyBar([redButton,blueButton,greenButton,yellowButton,magentaButton,blackButton,whiteButton]);
colorControl = L.easyBar([redButton,blueButton,greenButton,yellowButton,cyanButton,magentaButton,blackButton,whiteButton]);
layers["_drawing"] = new L.FeatureGroup();
overlays["drawing"] = layers["_drawing"];
@ -2651,7 +2652,7 @@ function doGeojson(n,g,l,o) {
st.fillColor = feature.style["fill-color"] || feature.style["fill"] || st.fillColor;
st.fillOpacity = feature.style["fill-opacity"] || st.fillOpacity;
}
if (feature.hasOwnProperty("geometry") && feature.geometry.hasOwnProperty("type") && feature.geometry.type === "LineString") {
if (feature.hasOwnProperty("geometry") && feature.geometry.hasOwnProperty("type") && (feature.geometry.type === "LineString" || feature.geometry.type === "MultiLineString") ) {
st.fill = false;
}
return st;