Pin colour on map Widget

Hi. I am currently trying to change the pin color of a fixed location (saved manually from the device configuration) on a map widget. The variable that contain the color condition is working OK, but the color of the pin does not change.

Anyone knows what is the problem??

Thanks!!

Hello @scostantino,

Did you set up the pin configuration?

Can you check it for me, please?

Hi @alinetusi, thanks for your answer. I have the color condition in another variable. I will explain better:

On map widget I have this two variables:

Location variable was setting there:

And estadored is sending by the device.

Color condition is setting at this way:

Before, I tried to do this sending location variable from the device and it works.

Hi @scostantino,
Using the front-end, you only can set the color and the icon for one variable by each device.

However, if you want to set the icon and the color for more than one variable for each device, you can send the information by metadata, for example:

[
  {
"variable": "estadored",
"value": "TagoIO Headquarters",
"location": {
"lat": 35.770723,
 "lng": -78.677328
},
"metadata" :{
  "icon": "car",
  "color": "red" 
}
  }
]

IMPORTANT: You can’t set the color information of pins if you use the device’s quick map. You need to send a metadata property, and you can’t send that through the quick map.

If you choose to use the metadata to send the pin configuration you will need to change the map configuration to get the information by the metadata from the variable:

TIP: you can send the color using hexadecimal instead of the string.

I will try by this way, thanks!

1 Like