﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
11980	MapCSS: icon-width and icon-height are sometimes ignored if ~= is used	Nakaner	team	"If I specify the icon size in a different rule than the icon itself and use the list operator (key~=value), nodes which match multiple rules get icons with doubled width and height. Following MapCSS has the bug. (The code is minimal working example based on OpenRailwayMap Maxspeed Style)

I have attached a ZIP file which contains a minimium working example (OSM file, MapCSS style, icons).


{{{
#!mapcss
node[""railway:signal:speed_limit_distant:form""=sign][""railway:signal:speed_limit_distant:speed""=~/^(3|4)0$/]
{
	z-index: eval(95 + tag(""railway:signal:speed_limit_distant:speed"")/2);
	icon-width: 22;
	icon-height: 19;
	allow-overlap: true;
}

node[""railway:signal:speed_limit_distant:form""=light][""railway:signal:speed_limit_distant:speed""=~/^(3|4)0$/]
{
	z-index: eval(95 + tag(""railway:signal:speed_limit_distant:speed"")/2);
	icon-width: 14;
	icon-height: 19;
	allow-overlap: true;
}
node[""railway:signal:speed_limit_distant:form""=sign][""railway:signal:speed_limit_distant:speed""=30]
{
	icon-image: ""icons/de/zs3v-30-sign-down-44.png"";
}
node[""railway:signal:speed_limit_distant:form""=light][""railway:signal:speed_limit_distant:speed""~=30]
{
	icon-image: ""icons/de/zs3v-30-light-38.png"";
}
node[""railway:signal:speed_limit_distant:form""=sign][""railway:signal:speed_limit_distant:speed""=40]
{
	icon-image: ""icons/de/zs3v-40-sign-down-44.png"";
}
node[""railway:signal:speed_limit_distant:form""=light][""railway:signal:speed_limit_distant:speed""~=40]
{
	icon-image: ""icons/de/zs3v-40-light-38.png"";
}
}}}



{{{
Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2015-09-28 01:32:03
Last Changed Author: simon04
Revision: 8800
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2015-09-27 22:11:06 +0200 (Sun, 27 Sep 2015)
Last Changed Rev: 8800

Identification: JOSM/1.5 (8800 de) Linux Arch Linux
Memory Usage: 339 MB / 1746 MB (162 MB allocated, but free)
Java version: 1.7.0_85, Oracle Corporation, OpenJDK 64-Bit Server VM
VM arguments: [-Djosm.restart=true]

Plugins:
- buildings_tools (31603)
- reverter (31603)
- utilsplugin2 (31603)

Last errors/warnings: # These erorrs are not related to this maxspeed style which causes the problem.
- W: Could not get presets icon museum.png
- E: Fehler beim Laden des Bildes 'industrial.png'
- W: Could not get presets icon industrial.png
- E: Fehler beim Laden des Bildes 'gate.png'
- W: Could not get presets icon gate.png
}}}
"	defect	closed	normal		Core mappaint	tested	othersoftware	template_report, MapCSS, icon, icon size	
