JOSM highlight floating gate node with mapcss

I’d like to connect floating nodes, barrier=gates specifically.

node:unconnected["barrier"="gate"] {
    text: "floating";
    symbol-size: 100;
    symbol-color: red;
}

What don’t I understand about mapcss, that I need to add so JOSM shows something for these nodes?

This is overriding the address housenumber next to the icon.

Currently, I can only seem to affect non-icon floating nodes, but gates have that icon on them.

Ideally I’d like to also have a validator rule for them.

1 Like

It is recommended to have explicit values. Try

node:unconnected["barrier"="gate"] {
	text: 'floating';
	text-color:navy;
	text-opacity:1;
	font-size:12;
	symbol-size: 100;
	symbol-shape:circle;	
	symbol-fill-color: red;
	symbol-fill-opacity:0.3;
}

Oh, really, it’s necessary to use single quotes instead of double quotes? Wow, ok then.
Actually, only text: eval("floating"); shows it without any quotes, good.

Well, the other issue is that the rest doesn’t do anything, the gate-icon is overriding the highlighting, only the text appears. Which works, but it’s not as nice as I’d like.

To help us undertand your problem, it would help that you provide an example of OSM data were you have problems to render with mapcss.

In Mapcss, you can apply rendering priorities by using z-index. You have also to assure that no other mapcss selected is conflicting with your custom mapcss.

Unselecting other mapcss, and adding to you instruction index: -1; works for me.