Modify from last article "osmdroid MapView - to follow user location".
@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
myLocationOverlay.enableMyLocation();
myLocationOverlay.enableCompass();
myLocationOverlay.enableFollowLocation();
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
myLocationOverlay.disableMyLocation();
myLocationOverlay.disableCompass();
myLocationOverlay.disableFollowLocation();
}
It work as expected in Android 3 device, but fail in Android 4! The simplest solution is to specify target SDK version to API Level 11 in AndroidManifest.xml.
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="11" />
Next:
- osmdroid MapView: set zoom level and add scale bar.

i have fully write this code in eclipse and i want to display it on my emulator but its only shows a grid pattern with scale on the upper right corner but not showing a map can any body tell how the map can be shown in it.
ReplyDeletebecause map is always stored in SD card ..its not like google maps where it is cached inside phone internal memory...run it on mobile directly from eclipse or android studio and disconnect the data cable after that wait for some time to let the device prepare the SD card and it will display man .... :)
Deletethe mylocation does not appear . is there any problem ? the location is set to my current location but the icon does not appear.
ReplyDeleteplease do suggest a solution.
thank you