Hi again.
Been busy so only just had time to reply...
I'm not sure what you mean by 'display the flag'.
Is the flag an icon or Label that you're trying to display underneath the Marker?
Are you using the new version 4.1 alpha library or the existing version 3.0.8?
If you're using version 4.1 and the new ViewHost then when you initialize the ViewHost you have the Alignment parameter:
Initialize (View1 As View, GeoPoint1 As GeoPoint, OffsetX As Int, OffsetY As Int, Alignment As Int, Visible As Boolean)
Alignment is one of the OSMDroid_LayoutParams values:
ALIGN_BOTTOM_CENTER As Int
ALIGN_BOTTOM_LEFT As Int
ALIGN_BOTTOM_RIGHT As Int
ALIGN_CENTER As Int
ALIGN_CENTER_LEFT As Int
ALIGN_CENTER_RIGHT As Int
ALIGN_TOP_CENTER As Int
ALIGN_TOP_LEFT As Int
ALIGN_TOP_RIGHT As Int
MATCH_PARENT As Int
WRAP_CONTENT As Int
That along with the OffsetX and OffsetY parameters should allow you to position the ViewHost exactly what you need it relative to the GeoPoint that it is anchored to.
With version 4.1 in order to display the ScaleBarOverlay you need to add this entry using the Manifest Editor:
SetApplicationAttribute(android:hardwareAccelerated, "false")
I'm not sure if that's also required for the CompassOverlay.
You can try that entry with version 3.0.8 and see if it makes any difference.
You want to fit the map to contain an Overlay?
Most Overlay's have a method:
GetBoundingBox As BoundingBox
Which can be used with the MapView method:
ZoomToBoundingBox (BoundingBox1 As BoundingBoxE6)
That's version 4.1 syntax - version 3.0.8 has a similar syntax.
Martin.