I have created a simple project using osmdroid. I want to show a specefic point on the map. I am using the following libraries in the project:
1. osmdroid-android-4.3.jar
2. slf4j-android-1.5.8.jar
Here is my code:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final MapView map = (MapView) findViewById(R.id.map);
anotherOverlayItemArray = new ArrayList<OverlayItem>();
anotherOverlayItemArray.add(new OverlayItem(
"US", "US", new GeoPoint(38.883333, -77.016667)));
ItemizedIconOverlay<OverlayItem> anotherItemizedIconOverlay = new ItemizedIconOverlay<OverlayItem>(
this, anotherOverlayItemArray, null);
map.getOverlays().add(anotherItemizedIconOverlay);
}
I am getting the following error:
08-09 00:27:24.123: E/AndroidRuntime(4844): Caused by: java.lang.IllegalArgumentException: Resource not found: marker_default.png 08-09 00:27:24.123: E/AndroidRuntime(4844): at org.osmdroid.DefaultResourceProxyImpl.getBitmap(DefaultResourceProxyImpl.java:114)
Where am I going wrong?
I've found my problem, it was incorrect JAR file adding reference. https://github.com/osmdroid/osmdroid/issues/145