Hi Mark

It may be a clue that nat_ref does not occur in the style file at all.
As far as I can tell so far, the problem is happening after style
processing. Very strange.

In StyledConverter.elementSetup() if an element doesn't have a name but
it has a ref (ref|int_ref|nat_ref|etc.) the first ref gets assigned to

Yes, I was thinking that the fact that nat_ref was involved meant that it couldn't be anything much to do with ValueBuilder et al.

It turns out that the problem is Labels that are empty but not null. All such labels, however generated, show as whatever label was defined right after the first empty one.

The attached patch should fix it.

..Steve
Index: src/uk/me/parabola/imgfmt/app/Label.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/Label.java	(revision 1283)
+++ src/uk/me/parabola/imgfmt/app/Label.java	Mon Mar 15 15:39:56 GMT 2010
@@ -64,7 +64,7 @@
 	 * @return The offset within the LBL file of this string.
 	 */
 	public int getOffset() {
-		if (text == null)
+		if (text == null || text.isEmpty())
 			return 0;
 		else
 			return offset;
_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to