Issue
I'm using OSMDroid. I put my overlays marker in map view with
Marker startMarker = new Marker(mMapView);
startMarker.setPosition(VBA.getPosition());
startMarker.setIcon(getResources().getDrawable(R.drawable.ic_location_big));
startMarker.setTitle(VBA.getHotelName());
etc...
...
mMapView.getOverlays().add(startMarker);
Now i have to get all markers (for example thanks a foreach) to add a listener
Solution
mMapView MapView.getOverlays()
returns a List of Overlay
. Easy to scan.
Then to check if an overlay is a Marker:
if (overlay instanceof Marker) { ... }
Answered By - MKer
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.