Fix map base root

to Close #28
This commit is contained in:
Dave Conway-Jones 2017-11-23 22:00:58 +00:00
parent a478a3ac63
commit dd8ef10ec6
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
3 changed files with 5 additions and 3 deletions

View File

@ -7,6 +7,8 @@ map web page for plotting "things" on.
![Map Image](https://dceejay.github.io/pages/images/redmap.png) ![Map Image](https://dceejay.github.io/pages/images/redmap.png)
### Changes ### Changes
- v1.1.7 - extend path correctly - Issue #28
- v1.1.6 - cleanup/remove excess logging
- v1.1.5 - add ttl property to set expiry time (secs) of individual marker, and let command clear:"layername" delete a complete layer. - v1.1.5 - add ttl property to set expiry time (secs) of individual marker, and let command clear:"layername" delete a complete layer.
- v1.1.4 - Let layer control be visible or not - v1.1.4 - Let layer control be visible or not
- v1.1.3 - more typos. - v1.1.3 - more typos.

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-contrib-web-worldmap", "name" : "node-red-contrib-web-worldmap",
"version" : "1.1.6", "version" : "1.1.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" : {
"express": "^4.15.0", "express": "^4.15.0",

View File

@ -26,7 +26,7 @@ module.exports = function(RED) {
if (!socket) { if (!socket) {
var fullPath = path.posix.join(RED.settings.httpNodeRoot, 'worldmap', 'leaflet', 'sockjs.min.js'); var fullPath = path.posix.join(RED.settings.httpNodeRoot, 'worldmap', 'leaflet', 'sockjs.min.js');
socket = sockjs.createServer({sockjs_url:fullPath, log:function() {}, transports:"xhr-polling"}); socket = sockjs.createServer({sockjs_url:fullPath, log:function() {}, transports:"xhr-polling"});
socket.installHandlers(RED.server, {prefix:'/worldmap/socket'}); socket.installHandlers(RED.server, {prefix:path.posix.join(RED.settings.httpNodeRoot,'/worldmap/socket')});
} }
this.lat = n.lat || ""; this.lat = n.lat || "";
this.lon = n.lon || ""; this.lon = n.lon || "";
@ -93,7 +93,7 @@ module.exports = function(RED) {
RED.nodes.createNode(this,n); RED.nodes.createNode(this,n);
if (!socket) { if (!socket) {
var fullPath = path.posix.join(RED.settings.httpNodeRoot, 'worldmap', 'leaflet', 'sockjs.min.js'); var fullPath = path.posix.join(RED.settings.httpNodeRoot, 'worldmap', 'leaflet', 'sockjs.min.js');
socket = sockjs.createServer({sockjs_url:fullPath, prefix:'/worldmap/socket'}); socket = sockjs.createServer({sockjs_url:fullPath, prefix:path.posix.join(RED.settings.httpNodeRoot,'/worldmap/socket')});
socket.installHandlers(RED.server); socket.installHandlers(RED.server);
} }
var node = this; var node = this;