diff --git a/docs/Changelog.md b/docs/Changelog.md index 56eb4515..3a486d98 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -15,7 +15,7 @@ - vtm-ios-example module [#326](https://github.com/mapsforge/vtm/issues/326) - Handle layers enabled state [#342](https://github.com/mapsforge/vtm/issues/342) - Fix coord scale short overflow [#343](https://github.com/mapsforge/vtm/issues/343) -- Mapsforge map read improvements [#357](https://github.com/mapsforge/vtm/issues/357) +- Mapsforge map read improvements [#357](https://github.com/mapsforge/vtm/issues/357) [#370](https://github.com/mapsforge/vtm/issues/370) - Improve canvas DPI setting [#349](https://github.com/mapsforge/vtm/issues/349) - OSM indoor layer enhancements [#366](https://github.com/mapsforge/vtm/issues/366) - Gretty plugin at web modules [#338](https://github.com/mapsforge/vtm/issues/338) diff --git a/vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java b/vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java index 273ccf99..a216fb4a 100644 --- a/vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java +++ b/vtm/src/org/oscim/tiling/source/mapfile/MapDatabase.java @@ -77,11 +77,6 @@ public class MapDatabase implements ITileDataSource { static final Logger log = LoggerFactory.getLogger(MapDatabase.class); - /** - * Maximum way nodes sequence length which is considered as valid. - */ - private static final int MAXIMUM_WAY_NODES_SEQUENCE_LENGTH = 8192; - /** * Bitmask for the optional POI feature "elevation". */ @@ -224,7 +219,7 @@ public class MapDatabase implements ITileDataSource { } if (mIntBuffer == null) - mIntBuffer = new int[MAXIMUM_WAY_NODES_SEQUENCE_LENGTH * 2]; + mIntBuffer = new int[Short.MAX_VALUE * 2]; try { mTileProjection.setTile(tile); @@ -628,7 +623,7 @@ public class MapDatabase implements ITileDataSource { for (int coordinateBlock = 0; coordinateBlock < numBlocks; ++coordinateBlock) { int numWayNodes = mReadBuffer.readUnsignedInt(); - if (numWayNodes < 2 || numWayNodes > MAXIMUM_WAY_NODES_SEQUENCE_LENGTH) { + if (numWayNodes < 2 || numWayNodes > Short.MAX_VALUE) { log.warn("invalid number of way nodes: " + numWayNodes); logDebugSignatures(); return false;