revert use of ES6 import

This commit is contained in:
Dave Conway-Jones 2019-06-14 11:43:20 -04:00
parent a98ff9d087
commit f3c356bf7d
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
5 changed files with 113 additions and 47 deletions

View File

@ -1,5 +1,7 @@
### Change Log for Node-RED Worldmap ### Change Log for Node-RED Worldmap
- v2.0.14 - Revert use of ES6 import.
- v2.0.13 - Fix tracks colour.
- v2.0.12 - Ensure default icon is in place if not specified (regression) - v2.0.12 - Ensure default icon is in place if not specified (regression)
- v2.0.9 - Only update maxage on screen once it exists - v2.0.9 - Only update maxage on screen once it exists
- v2.0.8 - Drop beta flag, re-organise index, js and css files. Now using leaflet 1.4 - v2.0.8 - Drop beta flag, re-organise index, js and css files. Now using leaflet 1.4

View File

@ -9,6 +9,8 @@ map web page for plotting "things" on.
### Updates ### Updates
- v2.0.14 - Revert use of ES6 import.
- v2.0.13 - Fix tracks colour.
- v2.0.12 - Ensure default icon is in place if not specified (regression) - v2.0.12 - Ensure default icon is in place if not specified (regression)
- v2.0.9 - Only update maxage on screen once it exists - v2.0.9 - Only update maxage on screen once it exists
- v2.0.8 - Drop beta flag, re-organise index, js and css files. Now using leaflet 1.4 - v2.0.8 - Drop beta flag, re-organise index, js and css files. Now using leaflet 1.4

View File

@ -1,8 +1,8 @@
[ [
{ {
"id": "efb1f72f.d56a98", "id": "9b2a29cc.3c53a8",
"type": "worldmap", "type": "worldmap",
"z": "46213b15.1d9a74", "z": "f59603d8.0a6a",
"name": "", "name": "",
"lat": "", "lat": "",
"lon": "", "lon": "",
@ -12,14 +12,14 @@
"maxage": "", "maxage": "",
"usermenu": "hide", "usermenu": "hide",
"panit": "true", "panit": "true",
"x": 505, "x": 750,
"y": 195, "y": 420,
"wires": [] "wires": []
}, },
{ {
"id": "208a3922.4fc106", "id": "1714967f.e691ea",
"type": "inject", "type": "inject",
"z": "46213b15.1d9a74", "z": "f59603d8.0a6a",
"name": "", "name": "",
"topic": "", "topic": "",
"payload": "", "payload": "",
@ -28,34 +28,35 @@
"crontab": "", "crontab": "",
"once": false, "once": false,
"onceDelay": "", "onceDelay": "",
"x": 145, "x": 290,
"y": 135, "y": 360,
"wires": [ "wires": [
[ [
"59d2062e.e54db8" "1b24ad2f.198453"
] ]
] ]
}, },
{ {
"id": "59d2062e.e54db8", "id": "1b24ad2f.198453",
"type": "function", "type": "function",
"z": "46213b15.1d9a74", "z": "f59603d8.0a6a",
"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=\\\"../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={\n lat:lat, \n lon:lon, \n name:\"Mike\", \n icon:\"male\", \n color:\"#000\"};\nreturn msg;",
"outputs": 1, "outputs": 1,
"noerr": 0, "noerr": 0,
"x": 325, "x": 470,
"y": 195, "y": 420,
"wires": [ "wires": [
[ [
"efb1f72f.d56a98" "9b2a29cc.3c53a8",
"de5c4044.d4e0f"
] ]
] ]
}, },
{ {
"id": "c7fd20dd.46979", "id": "5af27cae.299144",
"type": "inject", "type": "inject",
"z": "46213b15.1d9a74", "z": "f59603d8.0a6a",
"name": "", "name": "",
"topic": "", "topic": "",
"payload": "", "payload": "",
@ -64,19 +65,19 @@
"crontab": "", "crontab": "",
"once": true, "once": true,
"onceDelay": "", "onceDelay": "",
"x": 125, "x": 270,
"y": 255, "y": 480,
"wires": [ "wires": [
[ [
"f88c9738.621ee8" "f1be23c1.dd096"
] ]
] ]
}, },
{ {
"id": "aa27dc72.3e70a", "id": "4bab3415.afdf9c",
"type": "ui_template", "type": "ui_template",
"z": "46213b15.1d9a74", "z": "f59603d8.0a6a",
"group": "1c6852f7.95a1ed", "group": "cd81d08b.eebb3",
"name": "", "name": "",
"order": 0, "order": 0,
"width": "6", "width": "6",
@ -85,36 +86,36 @@
"storeOutMessages": true, "storeOutMessages": true,
"fwdInMessages": true, "fwdInMessages": true,
"templateScope": "local", "templateScope": "local",
"x": 495, "x": 640,
"y": 255, "y": 480,
"wires": [ "wires": [
[] []
] ]
}, },
{ {
"id": "f88c9738.621ee8", "id": "f1be23c1.dd096",
"type": "template", "type": "template",
"z": "46213b15.1d9a74", "z": "f59603d8.0a6a",
"name": "", "name": "",
"field": "payload", "field": "payload",
"fieldType": "msg", "fieldType": "msg",
"format": "handlebars", "format": "handlebars",
"syntax": "mustache", "syntax": "mustache",
"template": "<iframe src=\"../worldmap\" height=300px ></iframe>", "template": "<iframe src=\"../worldmap\" height=300px ></iframe>",
"x": 325, "x": 470,
"y": 255, "y": 480,
"wires": [ "wires": [
[ [
"aa27dc72.3e70a" "4bab3415.afdf9c"
] ]
] ]
}, },
{ {
"id": "bdb72125.35aa9", "id": "de3a90c8.8179c",
"type": "ui_button", "type": "ui_button",
"z": "46213b15.1d9a74", "z": "f59603d8.0a6a",
"name": "", "name": "",
"group": "1c6852f7.95a1ed", "group": "cd81d08b.eebb3",
"order": 0, "order": 0,
"width": 0, "width": 0,
"height": 0, "height": 0,
@ -124,37 +125,52 @@
"payload": "", "payload": "",
"payloadType": "str", "payloadType": "str",
"topic": "", "topic": "",
"x": 145, "x": 290,
"y": 195, "y": 420,
"wires": [ "wires": [
[ [
"59d2062e.e54db8" "1b24ad2f.198453"
] ]
] ]
}, },
{ {
"id": "b9813d1d.028ac", "id": "223f301c.54ea9",
"type": "comment", "type": "comment",
"z": "46213b15.1d9a74", "z": "f59603d8.0a6a",
"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": 195, "x": 340,
"y": 75, "y": 300,
"wires": [] "wires": []
}, },
{ {
"id": "1c6852f7.95a1ed", "id": "de5c4044.d4e0f",
"type": "worldmap-tracks",
"z": "f59603d8.0a6a",
"name": "",
"depth": "5",
"layer": "combined",
"x": 610,
"y": 380,
"wires": [
[
"9b2a29cc.3c53a8"
]
]
},
{
"id": "cd81d08b.eebb3",
"type": "ui_group", "type": "ui_group",
"z": "46213b15.1d9a74", "z": "f59603d8.0a6a",
"name": "Default", "name": "Default",
"tab": "e4c4803b.93d4", "tab": "b34078e6.e60df8",
"disp": true, "disp": true,
"width": "6" "width": "6"
}, },
{ {
"id": "e4c4803b.93d4", "id": "b34078e6.e60df8",
"type": "ui_tab", "type": "ui_tab",
"z": "46213b15.1d9a74", "z": "f59603d8.0a6a",
"name": "Home", "name": "Home",
"icon": "dashboard" "icon": "dashboard"
} }

View File

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

View File

@ -23,7 +23,53 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="shortcut icon" type="image/ico" href="favicon.ico"/> <link rel="shortcut icon" type="image/ico" href="favicon.ico"/>
<link rel="import" href="worldmaphead.html"> <!-- <link rel="import" href="worldmaphead.html"> -->
<link rel="stylesheet" type="text/css" href="leaflet/font-awesome/css/font-awesome.min.css"/>
<link rel="stylesheet" type="text/css" href="leaflet/weather-icons-lite/css/weather-icons-lite.min.css"/>
<link rel="stylesheet" type="text/css" href="leaflet/leaflet.css"/>
<link rel="stylesheet" type="text/css" href="leaflet/leaflet-vector-markers.css">
<link rel="stylesheet" type="text/css" href="leaflet/MarkerCluster.css">
<link rel="stylesheet" type="text/css" href="leaflet/MarkerCluster.Default.css">
<link rel="stylesheet" type="text/css" href="leaflet/leaflet.draw.css">
<link rel="stylesheet" type="text/css" href="leaflet/leaflet-ruler.css">
<link rel="stylesheet" type="text/css" href="leaflet/easy-button.css">
<link rel="stylesheet" type="text/css" href="leaflet/leaflet.fullscreen.css">
<link rel="stylesheet" type="text/css" href="leaflet/Leaflet.Dialog.css">
<link rel="stylesheet" type="text/css" href="leaflet/leaflet-velocity.min.css">
<link rel="stylesheet" type="text/css" href="leaflet/Leaflet.Coordinates.css">
<link rel="stylesheet" type="text/css" href="leaflet/dialog-polyfill.css"/>
<link rel="stylesheet" type="text/css" href="css/worldmap.css"/>
<script src="leaflet/sockjs.min.js"></script>
<script src="leaflet/leaflet.js"></script>
<script src="leaflet/leaflet-vector-markers.min.js"></script>
<script src="leaflet/leaflet.boatmarker.js"></script>
<script src="leaflet/leaflet.markercluster.js"></script>
<script src="leaflet/leaflet.markercluster.freezable.js"></script>
<script src="leaflet/leaflet.active-layers.min.js"></script>
<script src="leaflet/leaflet.select-layers.min.js"></script>
<script src="leaflet/leaflet.draw.js"></script>
<script src="leaflet/leaflet-ruler.js"></script>
<script src="leaflet/easy-button.js"></script>
<script src="leaflet/Leaflet.fullscreen.min.js"></script>
<script src="leaflet/Leaflet.Dialog.js"></script>
<script src="leaflet/l.ellipse.min.js"></script>
<script src="leaflet/milsymbol.js"></script>
<script src="leaflet/nvg.js"></script>
<script src="leaflet/leaflet-heat.js"></script>
<script src="leaflet/TileLayer.Grayscale.js"></script>
<script src="leaflet/TileLayer.GrayscaleWMS.js"></script>
<script src="leaflet/L.Terminator.js"></script>
<script src="leaflet/leaflet-velocity.min.js"></script>
<script src="leaflet/leaflet-side-by-side.js"></script>
<script src="leaflet/OSMBuildings-Leaflet.js"></script>
<script src="leaflet/leaflet-omnivore.min.js"></script>
<script src="leaflet/Leaflet.Coordinates.js"></script>
<script src="leaflet/leaflet.latlng-graticule.js"></script>
<script src="leaflet/dialog-polyfill.js"></script>
<script src="images/emoji.js"></script>
</head> </head>
<body> <body>