Update info , readme, tidy NATO symbols code
This commit is contained in:
parent
f2bc8b6e74
commit
609335d4eb
@ -1,5 +1,6 @@
|
||||
### Change Log for Node-RED Worldmap
|
||||
|
||||
- v1.1.15 - Tidy of Info, Readme and NATO symbol options.
|
||||
- v1.1.14 - Add proper NATO symbology via <a href="https://github.com/spatialillusions/milsymbol" target="_new">milsymbol.js</a>
|
||||
- v1.1.13 - Add ability to set a building using a GeoJSON Feature set. {name:"MyTower":building:{...feature sets...}}
|
||||
- v1.1.12 - README changes, split out CHANGELOG.md
|
||||
|
12
README.md
12
README.md
@ -1,5 +1,6 @@
|
||||
node-red-contrib-web-worldmap
|
||||
=============================
|
||||
# node-red-contrib-web-worldmap
|
||||
|
||||
![NPM version](https://badge.fury.io/js/node-red-contrib-web-worldmap.svg)
|
||||
|
||||
A <a href="http://nodered.org" target="_new">Node-RED</a> node to provide world
|
||||
map web page for plotting "things" on.
|
||||
@ -35,6 +36,8 @@ Optional properties include
|
||||
- **accuracy** : combined with bearing, draws a polygon of possible direction.
|
||||
- **icon** : <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_new">font awesome</a> icon name.
|
||||
- **iconColor** : Standard CSS colour name or #rrggbb hex value.
|
||||
- **SIDC** : NATO symbology code (instead of icon). See below.
|
||||
- **building** : OSMbulding GeoJSON feature set to add 2.5D buildings to buildings layer. See below.
|
||||
- **ttl** : time to live, how long an individual marker stays on map in seconds (overrides general maxage setting)
|
||||
- **photoUrl** : adds an image pointed at by the url to the popup box.
|
||||
- **videoUrl** : adds an mp4 video pointed at by the url to the popup box. Ideally 320x240 in size.
|
||||
@ -73,9 +76,12 @@ To do this you need to supply a `msg.SIDC` instead of an icon, for example:
|
||||
{ name: "Emergency Medical Operation",
|
||||
lat: 51.05,
|
||||
lon: -1.35,
|
||||
SIDC:"ENOPA-------"
|
||||
SIDC:"ENOPA-------",
|
||||
options: { fillOpacity:0.8 }
|
||||
}
|
||||
|
||||
There are lots of extra options you can specify as `msg.options` - see the <a href="https://github.com/spatialillusions/milsymbol/tree/master/docs" target="_new">milsymbol docs here</a>.
|
||||
|
||||
### Buildings
|
||||
|
||||
The OSM Buildings layer is available in the layers menu. You can replace this with a building of your own by
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-contrib-web-worldmap",
|
||||
"version": "1.1.14",
|
||||
"version": "1.1.15",
|
||||
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||
"dependencies": {
|
||||
"express": "^4.16.3",
|
||||
|
@ -72,11 +72,12 @@
|
||||
<label for="node-input-name"><i class="fa fa-file"></i> Name</label>
|
||||
<input type="text" id="node-input-name" placeholder="name">
|
||||
</div>
|
||||
<div class="form-tips">Tip: By default <code>ctrl-shift-m</code> will load the map in a new tab.</div>
|
||||
<div class="form-tips">Tip: By default <code>⌘⇧m</code> - <code>ctrl-shift-m</code> will load the map in a new tab.</div>
|
||||
</script>
|
||||
|
||||
<script type="text/x-red" data-help-name="worldmap">
|
||||
<p>Plots "things" on a web map. Needs an internet connection.</p>
|
||||
<p>Shortcut - <code>⌘⇧m</code> - ctrl-shift-m to jump to Map.</p>
|
||||
<p>The minimum <code>msg.payload</code> must contain <code>name</code>, <code>lat</code> and <code>lon</code> properties, e.g.</p>
|
||||
<pre>{name:"Joe", lat:51, lon:-1.05}</pre>
|
||||
<p><code>name</code> must be a unique identifier.</p>
|
||||
@ -88,15 +89,21 @@
|
||||
<li><code>accuracy</code> : combined with bearing, draws a polygon of possible direction.</li>
|
||||
<li><code>icon</code> : <a href="http://fortawesome.github.io/Font-Awesome/icons/" target="_new">font awesome</a> icon name</li>
|
||||
<li><code>iconColor</code> : standard CSS color name or #rrggbb hex value.</li>
|
||||
<li><code>SIDC</code> : NATO symbology code (instead of icon).</li>
|
||||
<li><code>bulding</code> : OSMBuildings GeoJSON object.</li>
|
||||
<li><code>ttl</code> : time to live of an individual marker.</li>
|
||||
<li><code>photoUrl</code> : adds an image pointed at by the url to the popup box.</li>
|
||||
<li><code>videoUrl</code> : adds an mp4 (320x240) pointed at by the url to Popup box</li>
|
||||
<li><code>weblink</code> : link to an external web page.</li>
|
||||
<li><code>deleted</code> : set to <i>true</i> to remove the named marker. (default false)</li>
|
||||
</ul>
|
||||
<p>Any other sub-properties of <code>msg.payload</code> will be added to the icon popup text box as extra information.</p>
|
||||
<p>Icons of type <i>plane</i>, <i>ship</i> or <i>car</i> will use built in SVG icons that align to the
|
||||
<p>Icons of type <i>plane</i>, <i>ship</i>, <i>car</i>, <i>uav</i> or <i>arrow</i> will use built in SVG icons that align to the
|
||||
<code>bearing</code> value.</p>
|
||||
<p>There are some <a href="https://www.npmjs.com/package/node-red-contrib-web-worldmap" target="_new">extra commands</a>
|
||||
for drawing <b>lines</b> and <b>areas</b>, and to <b>add layers</b> and to <b>control</b> the map remotely, including how to
|
||||
use a local map server.</p>
|
||||
<p>Font Awesome (fa-icons 4.7) can also be used, as can NATO symbology codes (SIDC).</p>
|
||||
<p>See the <a href="https://www.npmjs.com/package/node-red-contrib-web-worldmap" target="_new">README</a> for further
|
||||
details and examples of icons and commands for drawing <b>lines</b> and <b>areas</b>, and to <b>add layers</b> and
|
||||
to <b>control</b> the map remotely, including how to use a local map server.</p>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -987,7 +987,8 @@ function setMarker(data) {
|
||||
myMarker = new ms.Symbol( data.SIDC, { uniqueDesignation:data.name });
|
||||
// Now that we have a symbol we can ask for the echelon and set the symbol size
|
||||
var opts = data.options || {};
|
||||
opts.size = opts.size || iconSz[myMarker.getProperties().echelon] || 20;
|
||||
opts.size = opts.size || iconSz[myMarker.getProperties().echelon] || 30;
|
||||
opts.size = opts.size * (opts.scale || 1);
|
||||
myMarker = myMarker.setOptions(opts);
|
||||
var myicon = L.icon({
|
||||
iconUrl: myMarker.toDataURL(),
|
||||
@ -1019,6 +1020,7 @@ function setMarker(data) {
|
||||
// }
|
||||
|
||||
// remove icon from list of properties, then add all others to popup
|
||||
if (data.hasOwnProperty("SIDC") && data.hasOwnProperty("options")) { delete data.options; }
|
||||
if (data.hasOwnProperty("icon") || (!data.hasOwnProperty("radius"))) {
|
||||
if (data.hasOwnProperty("icon")) { delete data.icon; }
|
||||
if (data.hasOwnProperty("iconColor")) { delete data.iconColor; }
|
||||
|
@ -1,5 +1,5 @@
|
||||
CACHE MANIFEST
|
||||
# date: May 28th 2018 - v1.1.14
|
||||
# date: May 30th 2018 - v1.1.15
|
||||
|
||||
CACHE:
|
||||
index.html
|
||||
|
Loading…
Reference in New Issue
Block a user