Skip to content

Commit

Permalink
Marker interface: more generics definitions opensciencemap#172
Browse files Browse the repository at this point in the history
  • Loading branch information
easdue authored and devemux86 committed Sep 17, 2016
1 parent 0c898bf commit bc0bbcb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions vtm/src/org/oscim/layers/marker/ItemizedLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public class ItemizedLayer<Item extends MarkerInterface> extends MarkerLayer<Ite
protected OnItemGestureListener<Item> mOnItemGestureListener;
protected int mDrawnItemsLimit = Integer.MAX_VALUE;

public ItemizedLayer(Map map, MarkerSymbol defaulMarker) {
this(map, new ArrayList<Item>(), defaulMarker, null);
public ItemizedLayer(Map map, MarkerSymbol defaultMarker) {
this(map, new ArrayList<Item>(), defaultMarker, null);
}

public ItemizedLayer(Map map, List<Item> list,
Expand Down
4 changes: 2 additions & 2 deletions vtm/src/org/oscim/layers/marker/MarkerLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.oscim.map.Map;

/**
* Draws a list of {@link MarkerItem} as markers to a map. The item with the
* Draws a list of {@link MarkerInterface} as markers to a map. The item with the
* lowest index is drawn as last and therefore the 'topmost' marker. It also
* gets checked for onTap first. This class is generic, because you then you get
* your custom item-class passed back in onTap(). << TODO
Expand All @@ -53,7 +53,7 @@ public abstract class MarkerLayer<Item extends MarkerInterface> extends Layer {
public MarkerLayer(Map map, MarkerSymbol defaultSymbol) {
super(map);

mMarkerRenderer = new MarkerRenderer((MarkerLayer<MarkerItem>) this, defaultSymbol);
mMarkerRenderer = new MarkerRenderer((MarkerLayer<MarkerInterface>) this, defaultSymbol);
mRenderer = mMarkerRenderer;
}

Expand Down
6 changes: 3 additions & 3 deletions vtm/src/org/oscim/layers/marker/MarkerRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class MarkerRenderer extends BucketRenderer {

private final SymbolBucket mSymbolLayer;
private final float[] mBox = new float[8];
private final MarkerLayer<MarkerItem> mMarkerLayer;
private final MarkerLayer<MarkerInterface> mMarkerLayer;
private final Point mMapPoint = new Point();

/**
Expand All @@ -51,7 +51,7 @@ public class MarkerRenderer extends BucketRenderer {
private InternalItem[] mItems;

static class InternalItem {
MarkerItem item;
MarkerInterface item;
boolean visible;
boolean changes;
float x, y;
Expand All @@ -64,7 +64,7 @@ public String toString() {
}
}

public MarkerRenderer(MarkerLayer<MarkerItem> markerLayer, MarkerSymbol defaultSymbol) {
public MarkerRenderer(MarkerLayer<MarkerInterface> markerLayer, MarkerSymbol defaultSymbol) {
mSymbolLayer = new SymbolBucket();
mMarkerLayer = markerLayer;
mDefaultMarker = defaultSymbol;
Expand Down

0 comments on commit bc0bbcb

Please sign in to comment.