Fix map creation error

This commit is contained in:
Victor Shcherb 2012-03-21 00:12:16 +01:00
parent 769acbf30f
commit 3dca79c49f

View file

@ -358,8 +358,8 @@ public class BinaryMapIndexWriter {
int tx = (x - pcalcx) >> SHIFT_COORDINATES;
int ty = (y - pcalcy) >> SHIFT_COORDINATES;
writeRawVarint32(mapDataBuf, tx);
writeRawVarint32(mapDataBuf, ty);
writeRawVarint32(mapDataBuf, CodedOutputStream.encodeZigZag32(tx));
writeRawVarint32(mapDataBuf, CodedOutputStream.encodeZigZag32(ty));
pcalcx = pcalcx + (tx << SHIFT_COORDINATES);
pcalcy = pcalcy + (ty << SHIFT_COORDINATES);
@ -390,8 +390,8 @@ public class BinaryMapIndexWriter {
int tx = (x - pcalcx) >> SHIFT_COORDINATES;
int ty = (y - pcalcy) >> SHIFT_COORDINATES;
writeRawVarint32(mapDataBuf, tx);
writeRawVarint32(mapDataBuf, ty);
writeRawVarint32(mapDataBuf, CodedOutputStream.encodeZigZag32(tx));
writeRawVarint32(mapDataBuf, CodedOutputStream.encodeZigZag32(ty));
pcalcx = pcalcx + (tx << SHIFT_COORDINATES);
pcalcy = pcalcy + (ty << SHIFT_COORDINATES);