How to add custom icon(from url) in world map for node-red

#1

In node-red dashboard I want to add a custom icon(from a api), but the node-red uses font-awesome icons by default. Is there any way we can change the icon which I will fetch from a http endpoint.

#2

Not today. What sort of thing did you have in mind ?

#3

I have a sensor geo data API which has geo location of each sensor and icon url associated with it. So, instead of font-awesome I want to use those icons from the url while plotting on world map.

#4

do you have an example ? (link ?)

#5

As I cannot able to provide that link. Consider like this https://png.icons8.com/search/2266EE which I got from some site.

#6

what size are your icons ?

#7

size may be around 30x30

#8

Hi - Have added this ability to latest worldmap... if msg.payload.icon starts with http it loads it as an icon.

[{"id":"6d9f0b97.42deb4","type":"function","z":"82738787.0e0338","name":"add icon","func":"msg.payload = {\n    name: \"Bird1\",\n    label: \"Some big bird\",\n    lat: 51.05,\n    lon: -1.35,\n    icon: \"https://img.icons8.com/windows/32/000000/bird.png\"\n};\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":1180,"wires":[["1a14b1e5.5bc58e"]]},{"id":"22fd5822.7bdd98","type":"inject","z":"82738787.0e0338","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":1180,"wires":[["6d9f0b97.42deb4"]]}]