Hi All, some help on working out how to do a heatmap layer needed please.
My original data looks like this:
[{
"ID": 001,
"Supplier": "Dredd Enterprises Inc.",
"Contract": 2000,
"Credit Score": "Secure",
"location": {
"longitude": -0.50000,
"latitude": 52.0000
}
}, {
"ID": 002,
"Supplier": "Ace Trucking Co",
"Contract": 1000,
"Credit Score": "Caution",
"location": {
"longitude": -0.60000,
"latitude": 53.0000
}
},{
"ID": 003,
"Supplier": "Angel Family Ltd",
"Contract": 500,
"Credit Score": "Caution",
"location": {
"longitude": -0.65000,
"latitude": 53.5000
}
}]
It will have a little transform using some JSONata to end up looking like this:
{
"name": "Dredd Enterprises Inc.",
"lat": 50.856563,
"lon": -0.677288,
"layer": "OSM",
"icon": "map-marker",
"iconColor": "purple"
}
My wish is that individual companies will have a heat indicator corresponding to the following:
IF Credit Score = Caution AND Contract >= 1000 THEN make heatIndicator Amber-ish
ELSE IF Credit Score = Caution AND Contract < 1000 THEN make heatIndicator Green-ish
ELSE IF Credit Score = Secure AND Contract >= 1000 THEN make heatIndicator Green-ish
ELSE IF Credit Score = Secure AND Contract >=2000 THEN make heatIndicator Amber-ish
etc.
ELSE make heatIndicator Amber-ish
...you get the idea.
I am not familiar with adding layers using commands for the Worldmap... and I can't find any particularly clear instructions on the heatmap.
Any assistance would be much appreciated!
d