Opened 11 years ago

Last modified 11 years ago

#11436 closed defect

[MapCSS] Failure on complicated eval commands — at Version 1

Reported by: Aun Johnsen <lists@…> Owned by: team
Priority: normal Milestone:
Component: Core mappaint Version: latest
Keywords: mapcss eval coalesce cond replace concat Cc: Klumbumbus, bastiK

Description (last modified by Klumbumbus)

In a github issue (https://github.com/OpenSeaMap/josm/issue#19) I was made aware of white square icons where multicoloured seamark icons should have been visible. I tested the area mentioned in my own copy of JOSM, also seeing the same white square placeholders. I than moved to the test area I used when last editing the MapCSS file, and to my disappointment encountered same problem there.

I know for a fact this worked in stable release of March, I always use stable when testing and correcting stylesheets, and offsetting of these icons was edited and committed on March 14, I did not check whether this worked in April, but since I didn't notice anything wrong believe so, I didn't edit seamarks, but very often have this style active also when editing other features.

Have this been caused with latest changes in MapCSS implementation, or have there been a planned syntax change?

Code block in question, see (here)

node["seamark:type"=buoy_lateral]::int1_buoy,
node["seamark:type"=beacon_lateral]::int1_buoy,
node["seamark:type"=buoy_cardinal]::int1_buoy,
node["seamark:type"=beacon_cardinal]::int1_buoy,
node["seamark:type"=buoy_isolated_danger]::int1_buoy,
node["seamark:type"=beacon_isolated_danger]::int1_buoy,
node["seamark:type"=buoy_safe_water]::int1_buoy,
node["seamark:type"=beacon_safe_water]::int1_buoy,
node["seamark:type"=buoy_special_purpose]::int1_buoy,
node["seamark:type"=beacon_special_purpose]::int1_buoy {
        icon-image:             eval(concat("https://raw.githubusercontent.com/OpenSeaMap/josm/master/icons/svg/Q/", coalesce(tag(concat("seamark:",tag("seamark:type"),":shape")), "buoyant"), "/", cond(has_tag_key(concat("seamark:",tag("seamark:type"),":colour_pattern")),concat(tag(concat("seamark:",tag("seamark:type"),":colour_pattern")),"/"), ""), coalesce(replace(tag(concat("seamark:",tag("seamark:type"),":colour")),";","_"), "generic"), ".svg" ));
        icon-height:    16;
        icon-opacity:   1;
    icon-offset-x:  1;
    icon-offset-y:  -6;
        text:                   "seamark:name";
        text-color:             black;
}

Example object in first area should have given the following URL:

https://raw.githubusercontent.com/OpenSeaMap/josm/master/icons/svg/Q/can/horizontal/red_white_red_white.svg

instead of

https://raw.githubusercontent.com/OpenSeaMap/josm/master/icons/svg/Q//.svg

What steps will reproduce the problem?

  1. Add paint style in https://github.com/OpenSeaMap/josm/raw/master/INT1_MapCSS.mapcss
  2. Load area in https://www.openstreetmap.org/#map=13/52.5844/5.8419 or https://www.openstreetmap.org/#map=13/-22.8559/-43.153

What is the expected result?

You are expected to see several icons rendered as nautical symbols in accordance with IHO INT-1 standard

What happens instead?

White placeholder icons shown instead of the expected symbols

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

Revision: 8339
Repository Root: http://josm.openstreetmap.de/svn
Relative URL: ^/trunk
Last Changed Author: stoecker
Last Changed Date: 2015-05-07 17:30:43 +0200 (Thu, 07 May 2015)
Build-Date: 2015-05-08 01:31:23
URL: http://josm.openstreetmap.de/svn/trunk
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Rev: 8339

Identification: JOSM/1.5 (8339 en) Mac OS X 10.10.4
Memory Usage: 350 MB / 910 MB (106 MB allocated, but free)
Java version: 1.8.0_40-ea, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
VM arguments: [-Djava.library.path=/Applications/JOSM.app/Contents/MacOS, -DLibraryDirectory=/Users/skippern/Library, -DDocumentsDirectory=/Users/skippern/Documents, -DApplicationSupportDirectory=/Users/skippern/Library/Application Support, -DCachesDirectory=/Users/skippern/Library/Caches, -DSandboxEnabled=false, -Dapple.laf.useScreenMenuBar=true, -Dcom.apple.macos.use-file-dialog-packages=true, -Dcom.apple.macos.useScreenMenuBar=true, -Dcom.apple.mrj.application.apple.menu.about.name=JOSM, -Dcom.apple.smallTabs=true]
Dataset consistency test: No problems found

Plugins:
- FixAddresses (30892)
- ImageryCache (31083)
- ImportImagePlugin (31114)
- OpeningHoursEditor (30962)
- PicLayer (31114)
- SeaMapEditor (30972)
- continuosDownload (1413902943)
- dataimport (30892)
- download_along (30892)
- geochat (31056)
- geotools (31068)
- jts (31002)
- lakewalker (30892)
- log4j (30892)
- mirrored_download (30962)
- opendata (31116)
- reverter (31120)
- scoutsigns (44)
- turnlanes (30892)
- turnrestrictions (31034)
- undelete (30892)
- utilsplugin2 (31120)

Last errors/warnings:
- E: Failed to locate image 'https://raw.githubusercontent.com/OpenSeaMap/josm/master/icons/svg/Q/Q9//.svg'
- E: Failed to locate image 'https://raw.githubusercontent.com/OpenSeaMap/josm/master/icons/svg/Q//.svg'
- E: Failed to locate image 'https://raw.githubusercontent.com/OpenSeaMap/josm/master/icons/svg/Q/Q9//.svg'
- E: Failed to locate image 'https://raw.githubusercontent.com/OpenSeaMap/josm/master/icons/svg/Q//.svg'
- E: Failed to locate image 'https://raw.githubusercontent.com/OpenSeaMap/josm/master/icons/svg/Q/Q9//.svg'

Change History (1)

comment:1 by Klumbumbus, 11 years ago

Cc: Klumbumbus added
Description: modified (diff)
Note: See TracTickets for help on using tickets.