[mkgmap-dev] [PATCH] feature/bugfix: allow comments in "overlays" style file
From Thilo Hannemann thannema at gmx.de on Mon Apr 20 11:54:21 BST 2009
The style files allow for comments by ignoring everything after "#". This was not handled in the "overlays" style file. Added code to handle it. Index: src/uk/me/parabola/mkgmap/osmstyle/OverlayReader.java =================================================================== --- src/uk/me/parabola/mkgmap/osmstyle/OverlayReader.java (revision 1006) +++ src/uk/me/parabola/mkgmap/osmstyle/OverlayReader.java (working copy) @@ -62,6 +62,12 @@ while (!ts.isEndOfFile()) { String line = ts.readLine(); + // Remove comments before parsing + int commentstart = line.indexOf("#"); + if (commentstart != -1) { + line = line.substring(0, commentstart); + } + String[] fields = line.split(":", 2); if (fields.length == 2) {
- Previous message: [mkgmap-dev] mkgmap api 0.6 ready?
- Next message: [mkgmap-dev] Bug Report: First rule matches in style files ... not quite!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list