This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

JOSM mapcss, combine files into one, possible?

0

When you have several mapcss files, you do not want to copy/paste it into one file. Can I make one file with all the url of the all these mapcss files in a particularly order.

Can this work?

mapcss
url access.mapcss
url vehicle.mapcss
url foot.mapcss

How?

asked 27 Jul '17, 12:01

Allroads's gravatar image

Allroads
222161725
accept rate: 10%

edited 27 Jul '17, 12:02


2 Answers:

2

As maxerickson already pointed out JOSM does not support @import. But you can use the awk command line tool to do that in a compilation-like step. (If your styles use icons, you might already distribute them as ZIP files).

See the makefile of OpenRailwayMap for further information. It executes an awk script which replaces the line

@import url('myFunnyFilename.mapcss');

by the content of myFunnyFilename.mapcss.

answered 01 Aug '17, 10:07

Nakaner's gravatar image

Nakaner
610813
accept rate: 16%

1

answered 27 Jul '17, 19:05

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

Thanks such short sentence and to understand what it means. •no @import

(27 Jul '17, 19:18) Allroads

Source code available on GitHub .