diff --git a/vtm/src/org/oscim/layers/tile/vector/VectorTileLoader.java b/vtm/src/org/oscim/layers/tile/vector/VectorTileLoader.java index 3f90aec5..ef0cc8f6 100644 --- a/vtm/src/org/oscim/layers/tile/vector/VectorTileLoader.java +++ b/vtm/src/org/oscim/layers/tile/vector/VectorTileLoader.java @@ -450,12 +450,13 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac Log.d(TAG, "missing symbol for " + mElement.tags.asString()); return; } - SymbolItem it = SymbolItem.pool.get(); - it.x = mElement.points[0]; - it.y = mElement.points[1]; - it.texRegion = symbol.texture; - it.billboard = true; - mTile.addSymbol(it); + for (int i = 0, n = mElement.getNumPoints(); i < n; i++) { + PointF p = mElement.getPoint(i); + + SymbolItem it = SymbolItem.pool.get(); + it.set(p.x, p.y, symbol.texture, true); + mTile.addSymbol(it); + } } @Override diff --git a/vtm/src/org/oscim/renderer/elements/SymbolItem.java b/vtm/src/org/oscim/renderer/elements/SymbolItem.java index 2a0a404f..ef252039 100644 --- a/vtm/src/org/oscim/renderer/elements/SymbolItem.java +++ b/vtm/src/org/oscim/renderer/elements/SymbolItem.java @@ -20,7 +20,6 @@ import org.oscim.renderer.atlas.TextureRegion; import org.oscim.utils.pool.Inlist; import org.oscim.utils.pool.SyncPool; - public class SymbolItem extends Inlist { public final static SyncPool pool = new SyncPool() { @@ -48,4 +47,18 @@ public class SymbolItem extends Inlist { public Bitmap bitmap; public Point offset; + public void set(float x, float y, TextureRegion texture, boolean billboard) { + this.x = x; + this.y = y; + this.texRegion = texture; + this.billboard = billboard; + } + + public void set(float x, float y, Bitmap bitmap, boolean billboard) { + this.x = x; + this.y = y; + this.bitmap = bitmap; + this.billboard = billboard; + } + }