
Hi Paul, this patch should add the address support for the area pois. Please let me know if this works for you ... Thanks Berni. Bernhard Heibler schrieb:
I have just tried the latest version of mkgmap from trunk with --add-pois-to-areas. It looks like the addresses were attached only to the original POIs but not for the generated for areas. Bug?
thanks for testing. You are right. Address information gathering is missing for the area generated pois. I think that should not be to hard to fix. I will have a look later on ...
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
Index: src/uk/me/parabola/mkgmap/main/MapMaker.java =================================================================== --- src/uk/me/parabola/mkgmap/main/MapMaker.java (revision 304) +++ src/uk/me/parabola/mkgmap/main/MapMaker.java (working copy) @@ -170,6 +170,7 @@ { MapPoint newPoint = new MapPoint(); newPoint.setName(shapeName); + newPoint.copyAddress(shape); newPoint.setType(pointType); newPoint.setLocation(shape.getLocation()); // TODO use centriod src.getPoints().add(newPoint); Index: src/uk/me/parabola/mkgmap/general/MapElement.java =================================================================== --- src/uk/me/parabola/mkgmap/general/MapElement.java (revision 304) +++ src/uk/me/parabola/mkgmap/general/MapElement.java (working copy) @@ -57,7 +57,7 @@ * @return the copy; */ public abstract MapElement copy(); - + public String getName() { return name; } @@ -67,6 +67,15 @@ this.name = name.toUpperCase(); } + public void copyAddress(MapElement orig) + { + zipCode = orig.zipCode; + city = orig.city; + region = orig.region; + country = orig.country; + attributes.putAll(orig.attributes); + } + public String getCity() { return city; }