More mutable itemized layer

This commit is contained in:
Emux
2020-04-27 21:22:27 +03:00
parent 4604f07042
commit 2d64186a1a
15 changed files with 147 additions and 144 deletions

View File

@@ -23,19 +23,14 @@ import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.Toast;
import org.oscim.android.canvas.AndroidGraphics;
import org.oscim.core.BoundingBox;
import org.oscim.core.GeoPoint;
import org.oscim.layers.marker.MarkerInterface;
import org.oscim.layers.marker.MarkerSymbol;
import org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
import org.oscim.map.Map;
import org.osmdroid.location.FlickrPOIProvider;
import org.osmdroid.location.FourSquareProvider;
import org.osmdroid.location.GeoNamesPOIProvider;
import org.osmdroid.location.NominatimPOIProvider;
import org.osmdroid.location.POI;
import org.osmdroid.location.PicasaPOIProvider;
import org.osmdroid.location.*;
import org.osmdroid.overlays.DefaultInfoWindow;
import org.osmdroid.overlays.ExtendedMarkerItem;
import org.osmdroid.overlays.ItemizedOverlayWithBubble;
@@ -45,7 +40,7 @@ import java.util.List;
public class POISearch {
private final ArrayList<POI> mPOIs;
ItemizedOverlayWithBubble<ExtendedMarkerItem> poiMarkers;
ItemizedOverlayWithBubble poiMarkers;
MarkerSymbol[] mMarkers;
private static final int MDEFAULT = 0;
@@ -57,9 +52,9 @@ public class POISearch {
POISearch() {
mPOIs = new ArrayList<POI>();
//POI markers:
final ArrayList<ExtendedMarkerItem> poiItems = new ArrayList<ExtendedMarkerItem>();
final ArrayList<MarkerInterface> poiItems = new ArrayList<>();
poiMarkers = new ItemizedOverlayWithBubble<ExtendedMarkerItem>(App.map,
poiMarkers = new ItemizedOverlayWithBubble(App.map,
App.activity,
null,
poiItems,

View File

@@ -24,10 +24,10 @@ import android.widget.Button;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import org.oscim.android.canvas.AndroidGraphics;
import org.oscim.core.GeoPoint;
import org.oscim.layers.PathLayer;
import org.oscim.layers.marker.MarkerInterface;
import org.oscim.layers.marker.MarkerSymbol;
import org.oscim.layers.marker.MarkerSymbol.HotspotPlace;
import org.osmdroid.location.GeocoderNominatim;
@@ -48,7 +48,7 @@ public class RouteSearch {
private final PathLayer mRouteOverlay;
//private final ItemizedOverlayWithBubble<ExtendedOverlayItem> mRouteMarkers;
private final ItemizedOverlayWithBubble<ExtendedMarkerItem> mItineraryMarkers;
private final ItemizedOverlayWithBubble mItineraryMarkers;
private final RouteBar mRouteBar;
@@ -63,9 +63,9 @@ public class RouteSearch {
mViaPoints = new ArrayList<GeoPoint>();
// Itinerary markers:
ArrayList<ExtendedMarkerItem> waypointsItems = new ArrayList<ExtendedMarkerItem>();
ArrayList<MarkerInterface> waypointsItems = new ArrayList<>();
mItineraryMarkers = new ItemizedOverlayWithBubble<ExtendedMarkerItem>(App.map,
mItineraryMarkers = new ItemizedOverlayWithBubble(App.map,
App.activity,
null,
waypointsItems,