fix geoson fill colour

This commit is contained in:
Dave Conway-Jones 2020-05-28 21:14:45 +01:00
parent a6f0d95c51
commit 7de292d666
No known key found for this signature in database
GPG Key ID: 302A6725C594817F
4 changed files with 18 additions and 23 deletions

View File

@ -1,10 +1,11 @@
### Change Log for Node-RED Worldmap
- v2.3.12 - Fix geoson feature properties fill color
- v2.3.11 - Better editing of drawing layer, add OpenTopoMap, and better Esri satellite
- v2.3.10 - improve geojson layer and name handling.
- v2.3.8 - fix fa-marker offset to improve accuracy.
- v2.3.7 - show icon within circle if icon present. Issue #128
- v2.3.6 - show ruler if grid is turned on.
- v2.3.10 - Improve geojson layer and name handling.
- v2.3.8 - Fix fa-marker offset to improve accuracy.
- v2.3.7 - Show icon within circle if icon present. Issue #128
- v2.3.6 - Show ruler if grid is turned on.
- v2.3.5 - Let tracks node handle array of points. Let http icons be rotated to hdg or bearing.
- v2.3.4 - Add aligning bus icon
- v2.3.3 - Fix satellite view max zoom
@ -18,8 +19,8 @@
- v2.1.4 - Fix alt and speed as strings
- v2.1.3 - Fix web page file path error
- v2.1.2 - Fix layercontrol remove bug. Issue #116
- v2.1.1 - fix bug in repeated add with polygon
- v2.1.0 - add ui-worldmap node to make embedding in Dashboard easier. Let -in node specify connection actions only.
- v2.1.1 - Fix bug in repeated add with polygon
- v2.1.0 - Add ui-worldmap node to make embedding in Dashboard easier. Let -in node specify connection actions only.
- v2.0.22 - fix SIDC missing property
- v2.0.21 - allow adding overlays without making them visible (visible:false). Issue #108
- v2.0.20 - ensure `fit` option is boolean, Issue #109. Fix track layers, Issue #110.

View File

@ -11,11 +11,12 @@ map web page for plotting "things" on.
### Updates
- v2.3.12 - Fix geoson feature properties fill color
- v2.3.11 - Better editing of drawing layer, add OpenTopoMap, and better Esri satellite
- v2.3.10 - improve geojson layer and name handling.
- v2.3.8 - fix fa-marker offset to improve accuracy.
- v2.3.7 - show icon within circle if icon present. Issue #128
- v2.3.6 - show ruler if grid is turned on.
- v2.3.10 - Improve geojson layer and name handling.
- v2.3.8 - Fix fa-marker offset to improve accuracy.
- v2.3.7 - Show icon within circle if icon present. Issue #128
- v2.3.6 - Show ruler if grid is turned on.
- v2.3.5 - Let tracks node handle array of points. Let http icons be rotated to hdg or bearing.
- v2.3.4 - Add aligning bus icon
- v2.3.3 - Fix satellite view max zoom
@ -24,13 +25,6 @@ map web page for plotting "things" on.
- v2.3.0 - Add colour options for drawing layer
- v2.2.1 - Better implementation of legend create/show/hide
- v2.2.0 - Add range rings and arcs function
- v2.1.6 - Add legend command to allow inserting an html legend
- v2.1.5 - Fix squawk icon color handling
- v2.1.4 - Fix alt and speed as strings
- v2.1.3 - Fix web page file path error
- v2.1.2 - Fix layercontrol remove bug. Issue #116
- v2.1.1 - fix bug in repeated add with polygon
- v2.1.0 - add ui-worldmap node to make embedding in Dashboard easier Let -in node specify connection actions only
- see [CHANGELOG](https://github.com/dceejay/RedMap/blob/master/CHANGELOG.md) for full list.

View File

@ -1,6 +1,6 @@
{
"name": "node-red-contrib-web-worldmap",
"version": "2.3.11",
"version": "2.3.12",
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
"dependencies": {
"cgi": "0.3.1",

View File

@ -1447,7 +1447,7 @@ function setMarker(data) {
sz = iconSz[myMarker.getProperties().echelon];
}
opts.size = opts.size || sz;
opts.size = opts.size * (opts.scale || 1);
opts.size = opts.size * 0.8 * (opts.scale || 1);
myMarker = myMarker.setOptions(opts);
var myicon = L.icon({
iconUrl: myMarker.toDataURL(),
@ -2089,17 +2089,17 @@ function doGeojson(n,g,l,o) {
var st = { stroke:true, color:"#910000", weight:2, fill:true, fillColor:"#910000", fillOpacity:0.3 };
st = Object.assign(st,o);
if (feature.hasOwnProperty("properties")) {
console.log("GPROPS", feature.properties)
//console.log("GPROPS", feature.properties)
st.color = feature.properties["stroke"] || st.color;
st.weight = feature.properties["stroke-width"] || st.weight;
st.fillColor = feature.properties["fill-color"] || st.fillColor;
st.fillColor = feature.properties["fill-color"] || feature.properties["fill"] || st.fillColor;
st.fillOpacity = feature.properties["fill-opacity"] || st.fillOpacity;
}
if (feature.hasOwnProperty("style")) {
console.log("GSTYLE", feature.style)
//console.log("GSTYLE", feature.style)
st.color = feature.style["stroke"] || st.color;
st.weight = feature.style["stroke-width"] || st.weight;
st.fillColor = feature.style["fill-color"] || st.fillColor;
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") {