added drawing api

add GeomBuilder, needs Jts

drawing_api: squashed

drawing_api: use JtsDrawable baseclass

- add makeCircle for testing

drawing_api: cleanups

drawing_api: refactor

drawing_api: use SpatialIndex

drawing_api: optimization + cleanup

drawing_api: VectorLayer

- use VectorLayer for PathLayer

drawing_api: make style builder more consistent with theme api

drawing_api: wip
This commit is contained in:
Hannes Janetzek
2015-06-17 23:21:57 +02:00
parent 3402308ced
commit b174f65122
24 changed files with 1967 additions and 349 deletions

View File

@@ -33,6 +33,8 @@ public class JeoVectorLayer extends JtsLayer {
private final RuleList mRules;
protected double mDropPointDistance = 0.01;
private double mMinX;
private double mMinY;
public JeoVectorLayer(Map map, VectorDataset data, Style style) {
super(map);

View File

@@ -1,7 +1,7 @@
package org.oscim.layers;
import org.jeo.geom.CoordinatePath;
import org.oscim.core.BoundingBox;
import org.oscim.core.Box;
import org.oscim.core.GeometryBuffer;
import org.oscim.core.MapPosition;
import org.oscim.core.MercatorProjection;
@@ -19,14 +19,16 @@ import com.vividsolutions.jts.geom.Geometry;
public abstract class JtsLayer extends AbstractVectorLayer<Geometry> {
private double mMinX;
private double mMinY;
public JtsLayer(Map map) {
super(map);
}
@Override
protected void processFeatures(Task t, BoundingBox bbox) {
processFeatures(t, new Envelope(bbox.getMinLongitude(), bbox.getMaxLongitude(),
bbox.getMinLatitude(), bbox.getMaxLatitude()));
protected void processFeatures(Task t, Box bbox) {
processFeatures(t, new Envelope(bbox.xmin, bbox.ymin, bbox.xmax, bbox.ymax));
}