# Worldmap - show Text an arrow for radius

**URL:** <https://discourse.nodered.org/t/worldmap-show-text-an-arrow-for-radius/44563>\
**Category:** General\
**Created:** [22 April 2021 18:51 UTC](https://discourse.nodered.org/t/worldmap-show-text-an-arrow-for-radius/44563 "2021-04-22T18:51:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![steinerma](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steinerma/32/37666_2.png) [@steinerma](https://discourse.nodered.org/u/steinerma)\
**Post date:** [22 April 2021 18:51 UTC](https://discourse.nodered.org/t/worldmap-show-text-an-arrow-for-radius/44563/1 "2021-04-22T18:51:15Z")

</div>

hi, i use "node-red-contrib-web-worldmap". I have already implemented the circle.  
-\> Is it possible to show the radius (blue arrow and text) on the dashboard here?  
-\> If drawing the radius would not be possible, is it possible to show a simple text out- or inside the circle?  
Pop-up is unfortunately not an option, because it could hide important POI's.  
Thanks a lot for your help!

 ![radius](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/c/7cc2c0315f31bd8ee21171d139e9a136cf516fd9.jpeg)

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [23 April 2021 07:50 UTC](https://discourse.nodered.org/t/worldmap-show-text-an-arrow-for-radius/44563/2 "2021-04-23T07:50:17Z")

</div>

You can draw a line but no options for arrow and no options to have text near that line.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/d/7dd0c81e45c24087bd9c12f0f5859bce37ba8c29.png)

---

<div class="post-metadata">

**Author:** ![steinerma](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steinerma/32/37666_2.png) [@steinerma](https://discourse.nodered.org/u/steinerma)\
**Post date:** [23 April 2021 08:33 UTC](https://discourse.nodered.org/t/worldmap-show-text-an-arrow-for-radius/44563/3 "2021-04-23T08:33:20Z")

</div>

thank you very much for your answer. Would it be possible to display a pop-up window 15m displaced from the center of the circle?  
--\> the way I have the function node, the pop-up is displayed in the center of the circle. I would have to add 15m to the variables of the coordinates (15m = radius). Do you have an approach for this?

```auto
[{"id":"5b0891c0.27faa","type":"function","z":"2280caa4.5bb226","name":"Popup Ereignisort","func":"var lat = flow.get(\"lat\");\nvar lon = flow.get(\"lon\");\nvar thing = {\n lat: lat, \n lon: lon, \n name:\"Ereignisort\",\n popup:'Radius roter Kreis = 15m',\n popped:true,\n extrainfo:\"Kreis Ereignisort\",\n layer:\"Pop-up Ereignisort\"\n \n};\nmsg.payload = thing;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1050,"y":2200,"wires":[["352a0280.0f4bae"]]}]

```

 ![radius_pop-up](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/7/8749710213b55ad24140d93c78e334c990652d88.jpeg)

---

<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 April 2021 08:56 UTC](https://discourse.nodered.org/t/worldmap-show-text-an-arrow-for-radius/44563/4 "2021-04-23T08:56:45Z")

</div>

maybe you can add the popup to the line ?

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [23 April 2021 08:57 UTC](https://discourse.nodered.org/t/worldmap-show-text-an-arrow-for-radius/44563/5 "2021-04-23T08:57:22Z")

</div>

```auto
node.send(
    {payload:{ 
        "name":"one", 
        "icon":"podcast",
        "lat":58.37225,
        "lon":26.683333,
        "popup":'<span>This way it overrides all from marker default popup</span>'
       
    }
})
node.send(
    {payload:{ 
        "name":"two", 
        "icon":"podcast",
        "lat":58.372478,
        "lon":26.683345,
        "custom":'This text will be added to marker default popup'
    }
})

```

Edit: clarified popup and custom property behavior

---

<div class="post-metadata">

**Author:** ![steinerma](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steinerma/32/37666_2.png) [@steinerma](https://discourse.nodered.org/u/steinerma)\
**Post date:** [24 April 2021 04:38 UTC](https://discourse.nodered.org/t/worldmap-show-text-an-arrow-for-radius/44563/6 "2021-04-24T04:38:42Z")

</div>

thank you both for your inputs! I can now display the radius thanks to you. For the text I use the popup, which I show or hide (depending on the zoom level). This solution is a good workaround.

Here is the function node for displaying the radius:

```auto
var lat = flow.get("lat");
var lon = flow.get("lon");
var thing = {
    name: "point", 
    lat: lat, 
    lon: lon, 
    bearing: 50,
    length: 30,
};
msg.payload = thing;
return msg;

```

---

<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:** [8 May 2021 04:39 UTC](https://discourse.nodered.org/t/worldmap-show-text-an-arrow-for-radius/44563/7 "2021-05-08T04:39:08Z")

</div>

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