I put the marker attribute to map.getOverlays().add(marker) but they are saying add metgod requre attribute drawable not a marker.
The currentMarker is a Marker universal verable.
` private void addMarker(GeoPoint point) {
map.getController().setCenter(point);
if(drawableMarker==null){
drawableMarker =new Drawable(getApplicationContext(),R.drawable.markerosm);
}
if (currentMarker != null) {
map.getOverlay().remove(currentMarker);
}
currentMarker = new Marker(map);
currentMarker.setPosition(point);
currentMarker.setAnchor(Marker.ANCHOR_CENTER, Marker.ANCHOR_BOTTOM);
map.getOverlay().add(currentMarker);
map.invalidate();
}`
I want the marker will set on osmdroid map.
New contributor
Rasuv Chandanshive is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.