Re: [mkgmap-dev] Problem with styles

I now have put the style folder in the mkgmap base map, and --style=fiets doesn't seem to work. Do I have to put the style in a zip-file? Willem1
sonke016 at planet.nl schrieb:
I have a problem when I'm trying to use a style. If I create a style, for example "fiets", put it in the folder "mkgmap\resources\styles\fiets", and I use the command
java -jar mkgmap.jar map.osm --tdbfile --style-file=styles\fiets then mkgmap just uses the default style. I tried almost everything: using --style, using quotation marks, using --style-file=resources\styles\fiets etc.
I think, the path of the style must be relative to your working directory. So when you are running in the mkgmap directory, the parameter --style-file=resources\styles\fiets should work.
Or you can put the fiets folder as a subfolder under your working directory, then the parameter would be --style=fiets.
Gruss Torsten

This works for me: I have a directory called mkgmap-burto-style. In it are: info lines options points polygons relations version I use the following option: --style-file=mkgmap-burto-style That assumes that mkgmap-burto-style is in the current directory. Obviously, you need to put in a pathname (absolute or relative) if it's elsewhere. Cheers, Mark

Thanks for your reaction. I executed the following command now: G:\Willem\Mijn documenten\mkgmap\mkgmapr1117>java -jar mkgmap.jar --style-file=fietskrt fiets2.osm I get the following exception: Error in style: Error: (relations:8): Stack size is 3 SEVERE (Main): java.util.concurrent.ExecutionException: uk.me.parabola.imgfmt.ExitException: Could not open style null java.util.concurrent.ExecutionException: uk.me.parabola.imgfmt.ExitException: Could not open style null at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:289) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:124) at uk.me.parabola.mkgmap.main.Main.main(Main.java:100) Caused by: uk.me.parabola.imgfmt.ExitException: Could not open style null at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.createStyler(Osm5MapD ataSource.java:126) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.load(Osm5MapDataSourc e.java:79) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:148) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:56) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:168) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:166) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exiting - if you want to carry on regardless, use the --keep-going option I included the used style (fietskrt) with this message. Does someone know what the problem is? Willem1 -----Oorspronkelijk bericht----- Van: Mark Burton [mailto:markb@ordern.com] Verzonden: zondag 26 juli 2009 22:35 Aan: mkgmap-dev@lists.mkgmap.org.uk Onderwerp: Re: [mkgmap-dev] Problem with styles This works for me: I have a directory called mkgmap-burto-style. In it are: info lines options points polygons relations version I use the following option: --style-file=mkgmap-burto-style That assumes that mkgmap-burto-style is in the current directory. Obviously, you need to put in a pathname (absolute or relative) if it's elsewhere. Cheers, Mark

Hello Willem,
I get the following exception:
Error in style: Error: (relations:8): Stack size is 3 ^^^^^^^^^^^
I think in your relations files the & operators are missing: Replace type=route route=bicycle network=rcn { apply { set fietsroutercn=yes; }} by type=route & route=bicycle & network=rcn { apply { set fietsroutercn=yes; }} ****---*------*------*------*------*------*------*------*------*------* *\Viele -- Volker Bosch, Humboldtstr.21, 70771 Leinf.-Echterdingen **\ Gruesse -- Tel:(0711)713967, E-Mail: volker.bosch@t-online.de ***\ -- http://www.s-line.de/homepages/bosch

Thank you! This indeed solved the problem. But the comment rules in the relation file should be changed, I simply copied this rule from the comment: # You can have rules for relations. Usually you will set tags on the # elements that make up the relation. # # eg. type=route route=bus { apply { set route=bus; add rn='${route_no}' ; }} Willem1 -----Oorspronkelijk bericht----- Van: Volker Bosch [mailto:volker.bosch@t-online.de] Verzonden: dinsdag 4 augustus 2009 19:54 Aan: mkgmap-dev@lists.mkgmap.org.uk Onderwerp: Re: [mkgmap-dev] Problem with styles Hello Willem,
I get the following exception:
Error in style: Error: (relations:8): Stack size is 3 ^^^^^^^^^^^
I think in your relations files the & operators are missing: Replace type=route route=bicycle network=rcn { apply { set fietsroutercn=yes; }} by type=route & route=bicycle & network=rcn { apply { set fietsroutercn=yes; }} ****---*------*------*------*------*------*------*------*------*------* *\Viele -- Volker Bosch, Humboldtstr.21, 70771 Leinf.-Echterdingen **\ Gruesse -- Tel:(0711)713967, E-Mail: volker.bosch@t-online.de ***\ -- http://www.s-line.de/homepages/bosch
participants (6)
-
Mark Burton
-
sonke016@planet.nl
-
Steve Ratcliffe
-
volker.bosch@t-online.de
-
Willem Sonke
-
willem.sonke@planet.nl