public class VectorLayer extends org.oscim.layers.vector.AbstractVectorLayer<Drawable> implements org.oscim.event.GestureListener
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
log |
protected JtsConverter |
mConverter |
protected org.oscim.utils.SpatialIndex<Drawable> |
mDrawables |
protected com.vividsolutions.jts.geom.Polygon |
mEnvelope |
protected double |
mMinX |
protected double |
mMinY |
protected java.util.List<Drawable> |
tmpDrawables |
| Constructor and Description |
|---|
VectorLayer(org.oscim.map.Map map) |
VectorLayer(org.oscim.map.Map map,
org.oscim.utils.SpatialIndex<Drawable> index) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Drawable drawable)
Adds a drawable to a list of geometries that have to be drawn in the next
map update.
|
void |
add(com.vividsolutions.jts.geom.Geometry geometry,
Style style)
Adds a JTS geometry and a style to a list of geometries that have to be
drawn in the next map update.
|
protected void |
addCircle(org.oscim.core.GeometryBuffer g,
org.oscim.core.MapPosition pos,
double px,
double py,
Style style) |
boolean |
contains(float x,
float y) |
protected void |
draw(org.oscim.layers.vector.AbstractVectorLayer.Task task,
int level,
Drawable d,
Style style) |
protected void |
drawLine(org.oscim.layers.vector.AbstractVectorLayer.Task t,
int level,
com.vividsolutions.jts.geom.Geometry line,
Style style) |
protected void |
drawPoint(org.oscim.layers.vector.AbstractVectorLayer.Task t,
int level,
com.vividsolutions.jts.geom.Geometry points,
Style style) |
protected void |
drawPolygon(org.oscim.layers.vector.AbstractVectorLayer.Task t,
int level,
com.vividsolutions.jts.geom.Geometry polygon,
Style style) |
boolean |
onGesture(org.oscim.event.Gesture g,
org.oscim.event.MotionEvent e) |
protected void |
processFeatures(org.oscim.layers.vector.AbstractVectorLayer.Task t,
org.oscim.core.Box bbox) |
void |
remove(Drawable drawable)
Removes the drawable from the list of drawn geometries.
|
void |
remove(com.vividsolutions.jts.geom.Geometry geometry)
removes the JTS geometry and its style from the list of drawn geometries.
|
onDetach, onMapEvent, updatepublic static final org.slf4j.Logger log
protected final org.oscim.utils.SpatialIndex<Drawable> mDrawables
protected final java.util.List<Drawable> tmpDrawables
protected final JtsConverter mConverter
protected double mMinX
protected double mMinY
protected com.vividsolutions.jts.geom.Polygon mEnvelope
public VectorLayer(org.oscim.map.Map map,
org.oscim.utils.SpatialIndex<Drawable> index)
public VectorLayer(org.oscim.map.Map map)
public void add(Drawable drawable)
drawable - public void add(com.vividsolutions.jts.geom.Geometry geometry,
Style style)
geometry - style - public void remove(Drawable drawable)
drawable - public void remove(com.vividsolutions.jts.geom.Geometry geometry)
geometry - protected void processFeatures(org.oscim.layers.vector.AbstractVectorLayer.Task t,
org.oscim.core.Box bbox)
processFeatures in class org.oscim.layers.vector.AbstractVectorLayer<Drawable>protected void draw(org.oscim.layers.vector.AbstractVectorLayer.Task task,
int level,
Drawable d,
Style style)
protected void drawPoint(org.oscim.layers.vector.AbstractVectorLayer.Task t,
int level,
com.vividsolutions.jts.geom.Geometry points,
Style style)
protected void drawLine(org.oscim.layers.vector.AbstractVectorLayer.Task t,
int level,
com.vividsolutions.jts.geom.Geometry line,
Style style)
protected void drawPolygon(org.oscim.layers.vector.AbstractVectorLayer.Task t,
int level,
com.vividsolutions.jts.geom.Geometry polygon,
Style style)
protected void addCircle(org.oscim.core.GeometryBuffer g,
org.oscim.core.MapPosition pos,
double px,
double py,
Style style)
public boolean contains(float x,
float y)
public boolean onGesture(org.oscim.event.Gesture g,
org.oscim.event.MotionEvent e)
onGesture in interface org.oscim.event.GestureListener