Class MvtDecoder
java.lang.Object
com.codename1.maps.vector.MvtDecoder
Decodes a Mapbox Vector Tile (MVT 2.1, application/x-protobuf) into the
in-memory VectorTile model using the framework's protobuf reader
(ProtoReader).
The geometry command stream is decoded per the MVT spec: integers are
either (command | count << 3) headers or zig-zag delta-encoded
parameters; MoveTo (1) starts a part, LineTo (2) extends it and
ClosePath (7) ends a polygon ring. Coordinates are kept tile-local
(0..extent); projection to the screen happens in TileRenderer.
-
Method Summary
Modifier and TypeMethodDescriptionstatic VectorTiledecode(byte[] data) Decodes raw tile bytes into aVectorTile.
-
Method Details
-
decode
Decodes raw tile bytes into aVectorTile. The input must already be decompressed (the tile sources gunzip transparently).- Throws:
IOException
-