From 56cd2d97a18733f89ef5dd73b52de68ef2c4a780 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Sat, 2 Mar 2019 23:21:47 +0000 Subject: [PATCH] Tidy up readme --- CHANGELOG.md | 2 +- README.md | 8 ++++++-- worldmap/index.html | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c0e795..973091c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ### Change Log for Node-RED Worldmap - - v1.5.29 - remove lat/lon from popup if using .popup property + - v1.5.29 - remove lat/lon from popup if using .popup property. Allow icon to be loaded from http. - v1.5.28 - Tidy up popup location and timing. Auto add countries overlay if no internet. - v1.5.27 - Add hide right click option to config panel - v1.5.26 - Ensure all map tiles loaded over https diff --git a/README.md b/README.md index 897ba74..899d067 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ map web page for plotting "things" on. ### Updates -- v1.5.29 - remove lat/lon from popup if using .popup property +- v1.5.29 - Remove lat/lon from popup if using .popup property. Allow icon to be loaded from http. - v1.5.28 - Tidy up popup location and timing. Auto add countries overlay if no internet. - v1.5.27 - Add hide right click option to config panel - v1.5.26 - Ensure all map tiles loaded over https @@ -68,7 +68,7 @@ Optional properties include - **bearing** : when combined with speed, draws a vector. - **accuracy** : when combined with bearing, draws a polygon of possible direction. - **lineColor** : CSS color name or #rrggbb value for bearing line or accuracy polygon - - **icon** : font awesome icon name, or :emoji name: + - **icon** : font awesome icon name, :emoji name:, or http:// - **iconColor** : Standard CSS colour name or #rrggbb hex value. - **SIDC** : NATO symbology code (can be used instead of icon). See below. - **building** : OSMbulding GeoJSON feature set to add 2.5D buildings to buildings layer. See below. @@ -92,6 +92,8 @@ If you use the name without the fa- prefix (eg `male`) you will get the icon ins You can also specify an emoji as the icon by using the :emoji name: syntax - for example `:smile:`. Here is a **[list of emojis](https://github.com/dceejay/RedMap/blob/master/emojilist.md)**. +Or you can specify an image to load as an icon by setting the icon to http(s)://... It will be scaled to 32x32 pixels. For example `"https://img.icons8.com/windows/32/000000/bird.png"` + There are also several special icons... - **plane** : a plane icon that aligns with the bearing of travel. @@ -201,6 +203,7 @@ then rather than draw a point and icon it draws the polygon. Likewise if it cont - **color** : can set the colour of the polygon or line. - **fillColor** : can set the fill colour of the polygon. - **fillOpacity** : can set the opacity of the polygon fill colour. + - **dashArray** : optional dash array for polyline. - **name** : is used as the id key - so can be redrawn/moved. - **layer** : declares which layer you put it on.. @@ -226,6 +229,7 @@ Areas, Lines and Circles can also specify more optional properties: - opacity - fill - fillOpacity + - dashArray - clickable (if true sets the passed in name as Popup) ## Drawing diff --git a/worldmap/index.html b/worldmap/index.html index e73ec15..b693f07 100644 --- a/worldmap/index.html +++ b/worldmap/index.html @@ -931,7 +931,7 @@ function setMarker(data) { opt.fillOpacity = data.fillOpacity || 0.2; opt.clickable = (data.hasOwnProperty("clickable")) ? data.clickable : false; opt.fill = (data.hasOwnProperty("fill")) ? data.fill : true; - if (data.hasOwnProperty("dashArray")) opt.dashArray = data.dashArray; + if (data.hasOwnProperty("dashArray")) { opt.dashArray = data.dashArray; } // Replace building if (data.hasOwnProperty("building")) {