Modify

Opened 4 years ago

Last modified 4 years ago

#20739 new defect

Layers not working in MapCSS styles

Reported by: janekkrueger11@… Owned by: team
Priority: major Milestone:
Component: Core mappaint Version:
Keywords: layer mapcss Cc: Klumbumbus

Description

What steps will reproduce the problem?

  1. Activate "OpenRailwayMap infrastructure standard layer".
  2. Look at any bridge or tunnel part of a properly mapped railway.

What is the expected result?

Tunnels are supposed to have a lighter color and bridges are supposed to have casing around them.

What happens instead?

Those things do not render in JOSM. This seems to be caused by them being on another layer in the .mapcss style.

Please provide any additional information below. Attach a screenshot if possible.

Here is the part of the style file which is supposed to render the aditional layers:

/***********/
/* bridges */
/***********/
way|z10-[bridge=yes].tracks,
way|z10-[bridge=cantilever].tracks,
way|z10-[bridge=covered].tracks,
way|z10-[bridge=movable].tracks,
way|z10-[bridge=trestle].tracks,
way|z10-[bridge=viaduct].tracks
{
	set .bridge;
}

way.bridge::bridges
{
	z-index: 1;
	casing-width: 3.5;
	casing-color: #797979;
}

way|z10-[tunnel=yes].tracks::tunnels
{
	z-index: 4000;
	width: 6;
	color: white;
	opacity: 0.6;
	linecap: butt;
}

I will also attach an image of how it looks in JOSM and an image of how it's supposed to look. This was rendered using Kothic-JS and the layers work perfectly fine there.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-04-01 23:17:01 +0200 (Thu, 01 Apr 2021)
Revision:17702
Build-Date:2021-04-01 21:46:03
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (17702 de) Windows 10 64-Bit
OS Build number: Windows 10 Home 2009 (19042)
Memory Usage: 256 MB / 2048 MB (66 MB allocated, but free)
Java version: 11.0.7+10-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 2560×1440 (scaling 1,00×1,00) \Display1 1920×1080 (scaling 1,00×1,00)
Maximum Screen Size: 2560×1440
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
VM arguments: [-Dicedtea-web.bin.location=C:\Program Files\OpenWebStart\javaws, --add-modules=java.scripting,java.sql, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop,ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop,ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop]
Dataset consistency test: No problems found

Plugins:
+ pbf (35720)
+ pt_assistant (2.1.10-80-g7d9bba3)
+ public_transport (35640)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
- https://www.openrailwaymap.org/styles/josm-additional.zip
- https://www.openrailwaymap.org/styles/electrified.zip
+ https://www.openrailwaymap.org/styles/standard.zip
- https://www.openrailwaymap.org/styles/maxspeed.zip
- https://www.openrailwaymap.org/styles/signals.zip
- D:\VMs\shared_folder\standard.zip
- D:\VMs\shared_folder\signals.zip
- D:\VMs\shared_folder\maxspeed.zip
- D:\VMs\shared_folder\electrified.zip
- D:\VMs\shared_folder\electrified1.zip

Last errors/warnings:
- 00000,516 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000,518 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00013,068 W: java.nio.file.FileSystemException: %UserProfile%\AppData\Local\Temp\josm_exec_powershell_9798861882200330723.txt: Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.
- 00013,069 W: Unable to request certificate of https://grca.nat.gov.tw
- 00021,183 W: Cannot lock cache directory. Will not use disk cache
- 00128,555 E: org.openstreetmap.josm.data.osm.DataIntegrityProblemException: Primitive must be part of the dataset: {Node id=-103258 version=0 V lat=54.340528973332226,lon=10.021837939023971}

Attachments (2)

Kothic-JS.PNG (834 bytes ) - added by janekkrueger11@… 4 years ago.
Style rendered in Kothic-JS
JOSM.PNG (242.6 KB ) - added by janekkrueger11@… 4 years ago.
Style rendered in JOSM

Download all attachments as: .zip

Change History (15)

by janekkrueger11@…, 4 years ago

Attachment: Kothic-JS.PNG added

Style rendered in Kothic-JS

by janekkrueger11@…, 4 years ago

Attachment: JOSM.PNG added

Style rendered in JOSM

comment:1 by Don-vip, 4 years ago

Component: CoreCore mappaint
Keywords: layer added

comment:2 by simon04, 4 years ago

Milestone: 21.04
Owner: changed from team to simon04
Status: newassigned

comment:3 by simon04, 4 years ago

In 17743/josm:

see #20739 - Add MapCSSParserTest.testLayerMatching

comment:4 by simon04, 4 years ago

In 17744/josm:

see #20739 - Extract Environment.getCascade

comment:5 by simon04, 4 years ago

Resolution: fixed
Status: assignedclosed

In 17745/josm:

fix #20739 - MapCSS: evaluate class on current and on default layer

comment:7 by simon04, 4 years ago

The behaviour of mixing .classes with ::layers is unspecified in Help/Styles/MapCSSImplementation. Falling back to the default layer as implemented in r17745 seemed reasonable. What should we do?

comment:8 by Klumbumbus, 4 years ago

Cc: Klumbumbus added

comment:9 by gaben, 4 years ago

Keywords: mapcss added

comment:10 by Klumbumbus, 4 years ago

Ticket #20802 has been marked as a duplicate of this ticket.

comment:11 by Klumbumbus, 4 years ago

Resolution: fixed
Status: closedreopened

comment:12 by simon04, 4 years ago

In 17824/josm:

see #20739 - Revert "MapCSS: evaluate class on current and on default layer"

This reverts commit r17745

comment:13 by simon04, 4 years ago

Milestone: 21.04
Owner: changed from simon04 to team
Status: reopenednew

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to janekkrueger11@….
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.