[mkgmap-dev] Commit: r1278: Add ability to set a road's class and speed from a CoordPOI.
From Mark Burton markb at ordern.com on Sun Oct 18 21:20:19 BST 2009
Felix, > The patch that you published (I only used the second one, as you said I > should forget about the first one) only applies to way.java > I attach it here for you. Maybe you assumed that I use some sort of > additional patch on StyledConverter.java too, which you forgot on the list? No, you didn't read my reply - here's what I said: > OK, let's try again. The attached patch adds a duplicate() method to > the Way class. > > It's only really needed when using the continue patch. You will have to > edit StyledConverter.class in the do while loop where it's > looping around until foundType.isFinal() and in the body of the loop > it is calling addRoad() or addLine(). In there, if the foundType is not > final you want to pass a duplicate of the way rather than the original. > > so instead of: addRoad(way, foundType) > > you have: addRoad(way.duplicate(), foundType) > > If foundType.isFinal() is true, you don't need to duplicate the way > (although if you do, no harm should come of it, just wastes a little > time). The second paragraph tells you that you have to edit StyledConverter.java within the loop that's processing each of the found types and use way.duplicate() instead of just way when you call addRoad(). I would expect it to say something like this within the do while loop: if(foundType.isRoad()) { if(foundType.isFinal()) addRoad(way, foundType); else addRoad(way.duplicate(), foundType); } else { if(foundType.isFinal()) addLine(way, foundType); else addLine(way.duplicate(), foundType); } Gettit? Mark
- Previous message: [mkgmap-dev] Commit: r1278: Add ability to set a road's class and speed from a CoordPOI.
- Next message: [mkgmap-dev] Commit: r1278: Add ability to set a road's class and speed from a CoordPOI.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list