# Maps and putting location information on it

**URL:** <https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747>\
**Category:** General\
**Created:** [22 August 2022 10:08 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747 "2022-08-22T10:08:30Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [22 August 2022 10:08 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/1 "2022-08-22T10:08:30Z")

</div>

Putting aside the `dashboard` for now I am more interested in the mechanics of getting it working. So I put it under `general` help rather than `dashboard` at this stage/point.

I receive a message with Lat/Long/Alt (Altitude optional) and it opens a map and puts a _marker_ on the map at that location.

I've never used this part of Node-red so I won't use any reserved words like MAP, as that may have another meaning in the maths world.

Someone - please?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [22 August 2022 10:16 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/2 "2022-08-22T10:16:32Z")

</div>

What is the actual question?.... If you have a msg with {payload:{name:"Trying",lat:-25,lon:-133}} then it will just plot it on the node-red-contrib-web-worldmap... see the sidebar help and then the readme for lots more info.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [22 August 2022 10:21 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/3 "2022-08-22T10:21:35Z")

</div>

(maybe it wasn't)

This is a whole new _Can of worms_ I am opening.

I'm looking for suggestions on which nodes I need and how to do it.  
It isn't I'm being lazy, but it is just 100% unknown and there are a lot of nodes.

If someone knows a good node/set that can do what I need, that is a start.

Thanks for the suggestion of that _node_.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [22 August 2022 10:28 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/4 "2022-08-22T10:28:39Z")

</div>

[That node](https://flows.nodered.org/node/node-red-contrib-web-worldmap) is what you need for 95% of it :-)... there is also a geofence node that may be useful and there are some other for converting units and stuff - but start with worldmap - look at the examples with it and the readme - and go from there.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [22 August 2022 10:38 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/5 "2022-08-22T10:38:00Z")

</div>

(I'm stupid - that's a given)

I've loaded a couple of example scripts.

None have a _GUI_ node.... Just the red coloured one.

So how/where am I supposed to see/get to the map?

I read this `{httpRoot}/worldmap`

So in my case would it be:  
`192.668.0.6/worldmap`

Not working. ☹

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [22 August 2022 10:43 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/6 "2022-08-22T10:43:40Z")

</div>

As per the sidebar help  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/e/1ee6e011c6c3edb7ae5611b3cc9b4ed0d53664cb.png)

As per the sidebar info  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/0/f02b7f635dfa102dba0a16a6b92807084985fafb.png)

Your {httpRoot} is more likely to be `http://192.168.0.6:1880` so try `http://192.168.0.6:1880/worldmap`

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [22 August 2022 10:50 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/7 "2022-08-22T10:50:43Z")

</div>

Sorry... As I said, it is a whole new can of worms.

Something is now happening.

(Sorry, still stuck.)

This is the flow:

```auto
[{"id":"f77a7ed4.f955d","type":"function","z":"f7d630bfc1b2f259","name":"Add person to map","func":"var thing = {\n name:\"Me\", \n lat: -33.8688,\n lon: -151.2093,\n icon:\"car\",\n iconColor:\"darkred\",\n extrainfo:\"Hello to Jason Isaacs\"\n};\nmsg.payload = thing;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":120,"wires":[["f83930ff.b21488"]]},{"id":"ec9da974.051b48","type":"inject","z":"f7d630bfc1b2f259","name":"","repeat":"","crontab":"","once":false,"topic":"","payload":"","payloadType":"str","x":160,"y":120,"wires":[["f77a7ed4.f955d"]]},{"id":"f83930ff.b21488","type":"worldmap","z":"f7d630bfc1b2f259","name":"","lat":"33.8688","lon":"151.2093","zoom":"","layer":"OSMG","cluster":"","maxage":"30","usermenu":"show","layers":"show","panit":"false","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"none","showgrid":"false","allowFileDrop":"false","path":"/worldmap","overlist":"DR,CO,RA,DN,HM","maplist":"OSMG,OSMC,EsriC,EsriS,EsriT,EsriO,EsriDG,NatGeo,UKOS,OpTop","mapname":"","mapurl":"","mapopt":"","mapwms":false,"x":590,"y":120,"wires":[]}]

```

And this is what I see on the screen.

Seems I am still missing something.

 ![Screenshot from 2022-08-22 20-50-16](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/2/525fd4d1a0b0b030d3cc5eed039b0c0b73a5ac33.jpeg)

# SORRY!

I had a `-` in the `long` value too.

Working.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [22 August 2022 11:31 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/8 "2022-08-22T11:31:13Z")

</div>

(Sorry, should I start a new thread, or ask you via `github`)

I see confusion with some of the settings.

That there is an overall _timeout_ value for the icons is slightly confusing.

How can I put icons there that are permanent?  
Others I'm not worried about.  
But some need to be there all the time.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [22 August 2022 16:22 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/9 "2022-08-22T16:22:23Z")

</div>

0 = infinite

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 August 2022 20:32 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/10 "2022-08-22T20:32:57Z")

</div>

I think that may cause a certain amount of consternation amongst those working in the field of mathematics.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [22 August 2022 21:58 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/11 "2022-08-22T21:58:01Z")

</div>

Ok. Think of it as 0 = no timeout. ( rather than a timeout of 0s. )

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [23 August 2022 00:28 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/12 "2022-08-23T00:28:59Z")

</div>

Yes, ok, but.....

That is a/the GLOBAL value for ALL.

Ok what I am asking may be out of scope, but this _can_ (tin - or worms) has only just been opened.

Some/certain things may need to be persistent and others have a timeout.  
Still exploring.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [23 August 2022 06:58 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/13 "2022-08-23T06:58:08Z")

</div>

Have you actually read the readme yet? Read the section on the basic parameters. Eg ttl

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [23 August 2022 07:51 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/14 "2022-08-23T07:51:00Z")

</div>

> [@dceejay](#):
>
> Think of it as 0 = no timeout.

Sorry, my comment was a lame attempt at jocularity rather than a serious comment.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [23 August 2022 07:54 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/15 "2022-08-23T07:54:43Z")

</div>

No worries. Just trying to keep it clear for OP.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 August 2022 04:53 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/16 "2022-08-24T04:53:11Z")

</div>

@dceejay .... Ok, but I hadn't seen that and equated it in that exact way.

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 September 2022 04:54 UTC](https://discourse.nodered.org/t/maps-and-putting-location-information-on-it/66747/17 "2022-09-07T04:54:05Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
