maps-plus icon indicating copy to clipboard operation
maps-plus copied to clipboard

markerColor does not work without setting layerGroup or icon

Open benwpr opened this issue 7 months ago • 3 comments

Hey, we just pushed our maps+ to production. We noticed the following:

Before we could set markerColor blue, red etc.. and if we mapped it, it would be a map with the different node clusters etc

After the upgrade, we saw they were all blue, actually, whatever color is the first row, it will globally take it.

I saw a few dashboard working ok. So I took that as my baseline and see what the difference was:

  • if the icon is set, it seems to work ok icon, one icontype per cluster
  • if layerGroup is set , seems to work ok (following the layerGroup = CLUSTER )

I tested with the sample SVG Markers / PNG markers. I commented out icon.

Using Splunk enterprise Version: 10.2.2

benwpr avatar Apr 20 '26 18:04 benwpr

It seems like the issue is wider than that - I cannot get markerColor to work properly at all - even the documented examples, e.g. Research Stations, where layerGroup is set - all the markers come up in red.

I have tried different markerColor for the entries associated with a layerGroup and can set layerIconColor to be one colour but the markerColor is not honoured, all items come up in the same colour.

I also see that it takes the first row's colour for all items and if you don't use layerIconColor it uses the first colour found for the layerGroup for the layerIconColor.

Using the latest 4.6.2 both in Splunk Cloud 10.2 and on-prem 9.4.4

bowesmana avatar Apr 21 '26 05:04 bowesmana

This snippet

| makeresults format=csv data="latitude,longitude,icon,layerGroup,markerColor
-33.7688,150.9063,person-booth,Alexander,blue
-27.6174,152.761,person-booth,Alexander,red
-38.1432,145.1228,person-booth,Alexander,red
-12.4634,130.8456,person-booth,Alexander,red"
| eval icon=if(markerColor="red", "warning", icon)
| fields -  layerGroup
| eval tooltip=printf("icon=%s, markerColor=%s", icon, markerColor)

results in this

Image

and if I remove the | fields - layerGroup I get this result

Image

which equates to what you describe above, but given the Stations example, it's the opposite, all icons are red unless you remove the layerGroup, in which case they become blue for the same icon type...

bowesmana avatar Apr 21 '26 06:04 bowesmana

This is fixed in v4.6.3, now available on Splunkbase.

Root cause: An icon caching optimization introduced in v4.1.1 stored the first-built marker icon per layerGroup and reused it for all subsequent rows. This meant the first row's markerColor was applied to every marker in that layer group, overriding per-row color values. The cache has been removed entirely — each row now builds a fresh icon, correctly honoring per-row markerColor, iconColor, and icon fields regardless of whether layerGroup is set.

Thanks to @benwpr for reporting and @bowesmana for the detailed repro cases — those were very helpful in diagnosing the scope of the issue.

sghaskell avatar Apr 22 '26 06:04 sghaskell