tags:

views:

78

answers:

1

Hi there,

I need to display a pretty image of a map of Europe, and I want my app to, e.g. bring up a different activity, when the user clicks each country - each country on the map needs to have a different onClickListener (or equivalent).

Essentially, I need to be able to call a different function when the user taps on France rather than Spain in an image such as this: http://commons.wikimedia.org/wiki/File:Blank_map_of_Europe_cropped.svg

How would I best go about this on Android?

I've got ideas, but there may be some simple way that I'm overlooking.

Many thanks in advance!

Cheers, r3mo

A: 

I'm also very interested on this question, and couldn't find that much information around. Simplest way seems to be using an ImageView and define a onClickListener, but then you need to specify the coords within the listener..

in this post: http://groups.google.com/group/android-beginners/browse_thread/thread/c344619ed4317445?pli=1

someone asked a similar question. suggested approaches include MotionEvent, OnTouchListener and onClickListener, but I'm not sure which one to use.

I would like to have something similar to an html map area... something that apparently doesn't exist in Android's API.

thanks,

pau.

pau