use new GeometryBuffer functions
This commit is contained in:
parent
949ebb5d8e
commit
61e9deb101
@ -18,6 +18,7 @@ import org.oscim.backend.Log;
|
|||||||
import org.oscim.core.GeometryBuffer.GeometryType;
|
import org.oscim.core.GeometryBuffer.GeometryType;
|
||||||
import org.oscim.core.MapElement;
|
import org.oscim.core.MapElement;
|
||||||
import org.oscim.core.MercatorProjection;
|
import org.oscim.core.MercatorProjection;
|
||||||
|
import org.oscim.core.PointF;
|
||||||
import org.oscim.core.Tag;
|
import org.oscim.core.Tag;
|
||||||
import org.oscim.core.TagSet;
|
import org.oscim.core.TagSet;
|
||||||
import org.oscim.core.Tile;
|
import org.oscim.core.Tile;
|
||||||
@ -405,10 +406,8 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
|
|||||||
if (value == null)
|
if (value == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float x = mElement.points[0];
|
PointF p = mElement.getPoint(0);
|
||||||
float y = mElement.points[1];
|
mTile.addLabel(TextItem.pool.get().set(p.x, p.y, value, text));
|
||||||
|
|
||||||
mTile.addLabel(TextItem.pool.get().set(x, y, value, text));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -417,10 +416,9 @@ public class VectorTileLoader extends TileLoader implements IRenderTheme.Callbac
|
|||||||
if (value == null)
|
if (value == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int i = 0, n = mElement.index[0]; i < n; i += 2) {
|
for (int i = 0, n = mElement.getNumPoints(); i < n; i++) {
|
||||||
float x = mElement.points[i];
|
PointF p = mElement.getPoint(i);
|
||||||
float y = mElement.points[i + 1];
|
mTile.addLabel(TextItem.pool.get().set(p.x, p.y, value, text));
|
||||||
mTile.addLabel(TextItem.pool.get().set(x, y, value, text));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user