# Is there is anyway to use Custom Icon in Worldmap node?

**URL:** <https://discourse.nodered.org/t/is-there-is-anyway-to-use-custom-icon-in-worldmap-node/57331>\
**Category:** Dashboard\
**Tags:** node-red-dashboard\
**Created:** [27 January 2022 11:29 UTC](https://discourse.nodered.org/t/is-there-is-anyway-to-use-custom-icon-in-worldmap-node/57331 "2022-01-27T11:29:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zak](https://avatars.discourse-cdn.com/v4/letter/z/8e7dd6/32.png) [@Zak](https://discourse.nodered.org/u/Zak)\
**Post date:** [27 January 2022 11:29 UTC](https://discourse.nodered.org/t/is-there-is-anyway-to-use-custom-icon-in-worldmap-node/57331/1 "2022-01-27T11:29:55Z")

</div>

Hey There.

i would like to plot points on the map using worldmap node, so far i have been successful in that, the problem is that i would like to use custom icons which are not part of the font-awesome or the emojis which are accepted by the worldmap.

i have seen an earlier post that showed that the worldmap can get the icon from a website, however this doesn't work for me as my project is offline and not connected to the internet.

is it possible to fetch the icons from a local folder and plot them on the map??, any help would be appreciated.

---

<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:** [27 January 2022 19:41 UTC](https://discourse.nodered.org/t/is-there-is-anyway-to-use-custom-icon-in-worldmap-node/57331/2 "2022-01-27T19:41:15Z")

</div>

Node-RED is itself a web server - which is where you are loading the worldmap from - so you can edit your settings.js file to set up a local directory to serve files from. se the httpStatic setting.

---

<div class="post-metadata">

**Author:** ![Zak](https://avatars.discourse-cdn.com/v4/letter/z/8e7dd6/32.png) [@Zak](https://discourse.nodered.org/u/Zak)\
**Post date:** [30 January 2022 11:26 UTC](https://discourse.nodered.org/t/is-there-is-anyway-to-use-custom-icon-in-worldmap-node/57331/3 "2022-01-30T11:26:58Z")

</div>

Hey dceejay.

thank you for your reply, i have setup the folder in the httpstatic to serve my files from, however i am still having difficulty in placing the name of the icon in my payload so it gets displayed on the map any hint on how i can make it?

---

<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:** [30 January 2022 11:41 UTC](https://discourse.nodered.org/t/is-there-is-anyway-to-use-custom-icon-in-worldmap-node/57331/4 "2022-01-30T11:41:52Z")

</div>

you should be able to just set `msg.payload.icon` to the required url something like `http://my-node-red-server:1880/my-static-path/icon.png` . You should also be able to load that direct for another browser session.  
You can also set msg.payload.iconSize to set the size of icon - otherwise it will get forced to 32x32px

---

<div class="post-metadata">

**Author:** ![Zak](https://avatars.discourse-cdn.com/v4/letter/z/8e7dd6/32.png) [@Zak](https://discourse.nodered.org/u/Zak)\
**Post date:** [30 January 2022 11:54 UTC](https://discourse.nodered.org/t/is-there-is-anyway-to-use-custom-icon-in-worldmap-node/57331/5 "2022-01-30T11:54:36Z")

</div>

Hey dceejay.  
i have tried the solution above yet i got an error

my httpstatic is in the below pic:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/2/12176ab4a42aa7d7ca757c81eeb03b57ec913ee0.png)

when i have tried the link as per your solution above its providing me the following error:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/b/6b7ccee87d1efe716f329afd0ed93a9c923cccd9.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/a/7ac88b6f5105501986be355359aabbe32226d413.png)

i have tried it in http and https and both were not able to provide the icon in the browser.

Note: i have restarted the node red once i have done changes on the settings file.

---

<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:** [30 January 2022 13:33 UTC](https://discourse.nodered.org/t/is-there-is-anyway-to-use-custom-icon-in-worldmap-node/57331/6 "2022-01-30T13:33:52Z")

</div>

so that would then be served as http://{your server is address}:1880/Computer.png

---

<div class="post-metadata">

**Author:** ![Zak](https://avatars.discourse-cdn.com/v4/letter/z/8e7dd6/32.png) [@Zak](https://discourse.nodered.org/u/Zak)\
**Post date:** [30 January 2022 13:34 UTC](https://discourse.nodered.org/t/is-there-is-anyway-to-use-custom-icon-in-worldmap-node/57331/7 "2022-01-30T13:34:24Z")

</div>

Dear dceejay.

i managed to figure it out, turns out that there is no need to write down the "my-static-path" in the url.

it is sufficient to write only [https://node-red-server:1880/icon.png](https://node-red-server:1880/icon.png), this worked like a charm for me hope it will help the others.

---

<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:** [13 February 2022 13:34 UTC](https://discourse.nodered.org/t/is-there-is-anyway-to-use-custom-icon-in-worldmap-node/57331/8 "2022-02-13T13:34:51Z")

</div>

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