Better scale NATO symbols
This commit is contained in:
parent
d47692f938
commit
0b7be08e70
@ -97,7 +97,7 @@ To do this you need to supply a `msg.SIDC` instead of an icon, for example:
|
|||||||
msg.payload = { name: "Emergency Medical Operation",
|
msg.payload = { name: "Emergency Medical Operation",
|
||||||
lat: 51.05,
|
lat: 51.05,
|
||||||
lon: -1.35,
|
lon: -1.35,
|
||||||
SIDC:"ENOPA-------",
|
SIDC: "ENOPA-------",
|
||||||
options: { fillOpacity:0.8 }
|
options: { fillOpacity:0.8 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"id": "104f9b89.5daf04",
|
"id": "fa3d2b67.0d5078",
|
||||||
"type": "worldmap",
|
"type": "worldmap",
|
||||||
"z": "5ab56e5e.449a5",
|
"z": "dfe4ec36.0a5a5",
|
||||||
"name": "",
|
"name": "",
|
||||||
"lat": "",
|
"lat": "",
|
||||||
"lon": "",
|
"lon": "",
|
||||||
@ -12,14 +12,14 @@
|
|||||||
"maxage": "",
|
"maxage": "",
|
||||||
"usermenu": "hide",
|
"usermenu": "hide",
|
||||||
"panit": "true",
|
"panit": "true",
|
||||||
"x": 490,
|
"x": 770,
|
||||||
"y": 280,
|
"y": 1120,
|
||||||
"wires": []
|
"wires": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "7892d55a.40864c",
|
"id": "4d3000c1.a4c81",
|
||||||
"type": "inject",
|
"type": "inject",
|
||||||
"z": "5ab56e5e.449a5",
|
"z": "dfe4ec36.0a5a5",
|
||||||
"name": "",
|
"name": "",
|
||||||
"topic": "",
|
"topic": "",
|
||||||
"payload": "",
|
"payload": "",
|
||||||
@ -27,54 +27,55 @@
|
|||||||
"repeat": "",
|
"repeat": "",
|
||||||
"crontab": "",
|
"crontab": "",
|
||||||
"once": false,
|
"once": false,
|
||||||
"x": 130,
|
"x": 410,
|
||||||
"y": 220,
|
"y": 1060,
|
||||||
"wires": [
|
"wires": [
|
||||||
[
|
[
|
||||||
"45dc04c5.811fcc"
|
"31c1899.d3d0b76"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "45dc04c5.811fcc",
|
"id": "31c1899.d3d0b76",
|
||||||
"type": "function",
|
"type": "function",
|
||||||
"z": "5ab56e5e.449a5",
|
"z": "dfe4ec36.0a5a5",
|
||||||
"name": "",
|
"name": "",
|
||||||
"func": "// create random position\nvar lat = 51 + Math.random() * 0.2;\nvar lon = -1.45 + Math.random() * 0.2;\nmsg.payload={lat:lat, lon:lon, name:\"Mike\", icon:\"male\", url:\"<a href=\\\"/red/ui/#/0\\\">IBM link</a>\"};\nreturn msg;",
|
"func": "// create random position\nvar lat = 51 + Math.random() * 0.2;\nvar lon = -1.45 + Math.random() * 0.2;\nmsg.payload={lat:lat, lon:lon, name:\"Mike\", icon:\"male\", url:\"<a href=\\\"/red/ui/#/0\\\">IBM link</a>\"};\nreturn msg;",
|
||||||
"outputs": 1,
|
"outputs": 1,
|
||||||
"noerr": 0,
|
"noerr": 0,
|
||||||
"x": 310,
|
"x": 590,
|
||||||
"y": 280,
|
"y": 1120,
|
||||||
"wires": [
|
"wires": [
|
||||||
[
|
[
|
||||||
"104f9b89.5daf04"
|
"fa3d2b67.0d5078"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "39ae2a4d.5a6f06",
|
"id": "28f4bf19.04c6c",
|
||||||
"type": "inject",
|
"type": "inject",
|
||||||
"z": "5ab56e5e.449a5",
|
"z": "dfe4ec36.0a5a5",
|
||||||
"name": "",
|
"name": "",
|
||||||
"topic": "",
|
"topic": "",
|
||||||
"payload": "/red/worldmap",
|
"payload": "",
|
||||||
"payloadType": "str",
|
"payloadType": "str",
|
||||||
"repeat": "",
|
"repeat": "",
|
||||||
"crontab": "",
|
"crontab": "",
|
||||||
"once": true,
|
"once": true,
|
||||||
"x": 140,
|
"onceDelay": "",
|
||||||
"y": 340,
|
"x": 390,
|
||||||
|
"y": 1180,
|
||||||
"wires": [
|
"wires": [
|
||||||
[
|
[
|
||||||
"a8660ccf.d7166"
|
"dd8e0887.5b4888"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "be72c0ae.5925b",
|
"id": "ce1dac49.66168",
|
||||||
"type": "ui_template",
|
"type": "ui_template",
|
||||||
"z": "5ab56e5e.449a5",
|
"z": "dfe4ec36.0a5a5",
|
||||||
"group": "c60f4e05.ebb48",
|
"group": "88c32df0.a0af9",
|
||||||
"name": "",
|
"name": "",
|
||||||
"order": 0,
|
"order": 0,
|
||||||
"width": "6",
|
"width": "6",
|
||||||
@ -82,36 +83,37 @@
|
|||||||
"format": "<div ng-bind-html=\"msg.payload | trusted\"></div>",
|
"format": "<div ng-bind-html=\"msg.payload | trusted\"></div>",
|
||||||
"storeOutMessages": true,
|
"storeOutMessages": true,
|
||||||
"fwdInMessages": true,
|
"fwdInMessages": true,
|
||||||
"x": 480,
|
"templateScope": "local",
|
||||||
"y": 340,
|
"x": 760,
|
||||||
|
"y": 1180,
|
||||||
"wires": [
|
"wires": [
|
||||||
[]
|
[]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "a8660ccf.d7166",
|
"id": "dd8e0887.5b4888",
|
||||||
"type": "template",
|
"type": "template",
|
||||||
"z": "5ab56e5e.449a5",
|
"z": "dfe4ec36.0a5a5",
|
||||||
"name": "",
|
"name": "",
|
||||||
"field": "payload",
|
"field": "payload",
|
||||||
"fieldType": "msg",
|
"fieldType": "msg",
|
||||||
"format": "handlebars",
|
"format": "handlebars",
|
||||||
"syntax": "mustache",
|
"syntax": "mustache",
|
||||||
"template": "<iframe src={{{payload}}} height=300px ></iframe>",
|
"template": "<iframe src=\"/worldmap\" height=300px ></iframe>",
|
||||||
"x": 310,
|
"x": 590,
|
||||||
"y": 340,
|
"y": 1180,
|
||||||
"wires": [
|
"wires": [
|
||||||
[
|
[
|
||||||
"be72c0ae.5925b"
|
"ce1dac49.66168"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "79411e5e.1af57",
|
"id": "ef0d9eba.478a5",
|
||||||
"type": "ui_button",
|
"type": "ui_button",
|
||||||
"z": "5ab56e5e.449a5",
|
"z": "dfe4ec36.0a5a5",
|
||||||
"name": "",
|
"name": "",
|
||||||
"group": "c60f4e05.ebb48",
|
"group": "88c32df0.a0af9",
|
||||||
"order": 0,
|
"order": 0,
|
||||||
"width": 0,
|
"width": 0,
|
||||||
"height": 0,
|
"height": 0,
|
||||||
@ -121,37 +123,37 @@
|
|||||||
"payload": "",
|
"payload": "",
|
||||||
"payloadType": "str",
|
"payloadType": "str",
|
||||||
"topic": "",
|
"topic": "",
|
||||||
"x": 130,
|
"x": 410,
|
||||||
"y": 280,
|
"y": 1120,
|
||||||
"wires": [
|
"wires": [
|
||||||
[
|
[
|
||||||
"45dc04c5.811fcc"
|
"31c1899.d3d0b76"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "235ad210.492b0e",
|
"id": "72196d3b.8a5724",
|
||||||
"type": "comment",
|
"type": "comment",
|
||||||
"z": "5ab56e5e.449a5",
|
"z": "dfe4ec36.0a5a5",
|
||||||
"name": "How to embed Map in Dashboard",
|
"name": "How to embed Map in Dashboard",
|
||||||
"info": "This example shows how to embed the Worldmap \ninto a template node within the `node-red-dashboard`\n\nThe first flow creates a dashboard button that \ngenerates a randon position, with the required \nicon, and passes that to the worldmap. The\nmap is configured to automatically pan to the\nposition of any point that arrives.\n\nThe second flow initialise the dashboard template\nwith the initial map and sets it to a more square shape\nby adjusting the height.",
|
"info": "This example shows how to embed the Worldmap \ninto a template node within the `node-red-dashboard`\n\nThe first flow creates a dashboard button that \ngenerates a randon position, with the required \nicon, and passes that to the worldmap. The\nmap is configured to automatically pan to the\nposition of any point that arrives.\n\nThe second flow initialise the dashboard template\nwith the initial map and sets it to a more square shape\nby adjusting the height.",
|
||||||
"x": 180,
|
"x": 460,
|
||||||
"y": 160,
|
"y": 1000,
|
||||||
"wires": []
|
"wires": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "c60f4e05.ebb48",
|
"id": "88c32df0.a0af9",
|
||||||
"type": "ui_group",
|
"type": "ui_group",
|
||||||
"z": "5ab56e5e.449a5",
|
"z": "dfe4ec36.0a5a5",
|
||||||
"name": "Default",
|
"name": "Default",
|
||||||
"tab": "6a3aec18.0bc474",
|
"tab": "f58bb1b.fd6cc5",
|
||||||
"disp": true,
|
"disp": true,
|
||||||
"width": "6"
|
"width": "6"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "6a3aec18.0bc474",
|
"id": "f58bb1b.fd6cc5",
|
||||||
"type": "ui_tab",
|
"type": "ui_tab",
|
||||||
"z": "5ab56e5e.449a5",
|
"z": "dfe4ec36.0a5a5",
|
||||||
"name": "Home",
|
"name": "Home",
|
||||||
"icon": "dashboard"
|
"icon": "dashboard"
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "node-red-contrib-web-worldmap",
|
"name": "node-red-contrib-web-worldmap",
|
||||||
"version": "1.3.6",
|
"version": "1.3.7",
|
||||||
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cgi": "0.3.1",
|
"cgi": "0.3.1",
|
||||||
|
@ -1018,6 +1018,7 @@ function setMarker(data) {
|
|||||||
// Now that we have a symbol we can ask for the echelon and set the symbol size
|
// Now that we have a symbol we can ask for the echelon and set the symbol size
|
||||||
var opts = data.options || {};
|
var opts = data.options || {};
|
||||||
opts.size = opts.size || iconSz[myMarker.getProperties().echelon] || 30;
|
opts.size = opts.size || iconSz[myMarker.getProperties().echelon] || 30;
|
||||||
|
opts.size = opts.size - 30) / 2 + 30;
|
||||||
opts.size = opts.size * (opts.scale || 1);
|
opts.size = opts.size * (opts.scale || 1);
|
||||||
myMarker = myMarker.setOptions(opts);
|
myMarker = myMarker.setOptions(opts);
|
||||||
var myicon = L.icon({
|
var myicon = L.icon({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
CACHE MANIFEST
|
CACHE MANIFEST
|
||||||
# date: July 17th 2018 - v1.3.6
|
# date: Sept 10th 2018 - v1.3.7
|
||||||
|
|
||||||
CACHE:
|
CACHE:
|
||||||
index.html
|
index.html
|
||||||
|
Loading…
Reference in New Issue
Block a user