tonyb
tonyb

Reputation: 3

Overlay a static image on a MapView

I'm still a newbie to Android but have searched high and low for an answer to my problem without success.

I have a map view that the user can fully manipulate (scroll, enlarge etc.) but I need to let the user know where the midpoint of the map is. I want to use a small "crosshair" image for this and display it at the centre of the map AT ALL TIMES and AT ALL LEVELS OF MAGNIFICATION. In fact, I just want the image to remain on view at all times. Can I find a way to do this? Can I hell!

I'm sure there is a very simply solution to this from one or two of you gurus out there. Please help.

Tony

Upvotes: 0

Views: 838

Answers (1)

icecreamman
icecreamman

Reputation: 611

In your layout file that contains the MapView, make sure that the Layout container is of type RelativeLayout. Then simply add the ImageView as a child of the RelativeLayout, with an attribute of layout_gravity="center"

Basically, research RelativeLayout.

Upvotes: 1

Related Questions