add fillColor to hulls

pull/150/head
Dave Conway-Jones 4 years ago
parent a7b78986b3
commit 795b6ce7b3
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF

@ -1,5 +1,6 @@
### Change Log for Node-RED Worldmap
- v2.5.7 - Let fillColor set color of hulls
- v2.5.6 - Let node accept plain text payload kml or nvg input
- v2.5.5 - Fix NVG import to handle symbols for points
- v2.5.4 - Fix delete of hulls

@ -11,6 +11,7 @@ map web page for plotting "things" on.
### Updates
- v2.5.7 - Let fillColor set color of hulls
- v2.5.6 - Let node accept plain text payload kml or nvg input
- v2.5.5 - Fix NVG import to handle symbols for points
- v2.5.4 - Fix delete of hulls
@ -25,16 +26,6 @@ map web page for plotting "things" on.
- 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.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
- v2.3.2 - Add better geojson support - name plus geojson properties
- v2.3.1 - Stop adding point when you add a circle
- 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
- see [CHANGELOG](https://github.com/dceejay/RedMap/blob/master/CHANGELOG.md) for full list.

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

@ -305,8 +305,8 @@ then by default <code>⌘⇧m</code> - <code>ctrl-shift-m</code> will load the m
RED.keyboard.add("*",/* m */ 77,{ctrl:true, shift:true},function() { window.open(document.location.protocol+"//"+lnk) });
}
else {
RED.keyboard.add("*","ctrl-shift-m","Show Map");
RED.actions.add("Show Map",function() { window.open(document.location.protocol+"//"+lnk) });
RED.keyboard.add("*","ctrl-shift-m","Show Map");
}
RED.nodes.registerType('worldmap',{
category: 'location',
@ -521,7 +521,7 @@ then by default <code>⌘⇧m</code> - <code>ctrl-shift-m</code> will load the m
<input type="text" id="node-input-name" placeholder="name">
</div>
</script>
<script type="text/html" data-help-name="worldmap-tracks">
<p>Creates tracks lines based on a specified number of previous locations.</p>
<p>The number of tracked points can be set per marker by specifying <code>msg.payload.trackpoints</code> as part of the update for a marker.</p>
@ -530,10 +530,10 @@ then by default <code>⌘⇧m</code> - <code>ctrl-shift-m</code> will load the m
large depth then memory usage may become excessive.</p>
<p>To delete a track send a msg.payload containing both the name of the object and
set deleted to true - for example <code>msg.payload = { "name":"Fred", "deleted":true }</code>.</p>
<p>This will also delete the point. If you just want to clear the track set the msg.payload to the
<p>This will also delete the point. If you just want to clear the track set the msg.payload to the
name+"_", for example <code>msg.payload = { "name":"Fred_", "deleted":true }</code></p>
</script>
<script type="text/javascript">
RED.nodes.registerType('worldmap-tracks',{
category: 'location',
@ -567,7 +567,7 @@ then by default <code>⌘⇧m</code> - <code>ctrl-shift-m</code> will load the m
<input type="text" id="node-input-name" placeholder="name">
</div>
</script>
<script type="text/html" data-help-name="worldmap-hull">
<p>Creates a convex-hull polygon around a set of supplied points.</p>
<p>Points can be made part of the same shape if they have the same <code>msg.payload.layer</code>
@ -575,7 +575,7 @@ then by default <code>⌘⇧m</code> - <code>ctrl-shift-m</code> will load the m
<p><b>Note</b>: the outgoing msg only contains the polygon to draw, so this node should be wired
in parallel to other paths going to the worldmap node.</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('worldmap-hull',{
category: 'location',
@ -596,4 +596,3 @@ then by default <code>⌘⇧m</code> - <code>ctrl-shift-m</code> will load the m
}
});
</script>

@ -427,6 +427,11 @@ module.exports = function(RED) {
newmsg.payload.name = newmsg.payload[node.prop];
newmsg.payload.clickable = true;
if (msg.payload.fillColor) {
newmsg.payload.color = msg.payload.fillColor;
newmsg.payload.fillColor = msg.payload.fillColor;
}
if (leafletHull.length === 1 && oldl === 2) {
newmsg.payload.deleted = true;
node.send(newmsg);

Loading…
Cancel
Save