Draggable Map pins

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Draggable Map pins

Postby a.fisher » Wed Oct 14, 2009 10:38 am

Hi everybody.

I've been trying to figure this out for a while now, but to no avail :(

There doesn't seem to be any examples with code.

What I'm trying to do is have an overlay appear on the map, defaulting to the user's GPS location, which so far I have managed to acheive. however I want to allow the user to drag the map pin overlay around the map, and record the final lat/long on ACTION_UP.

I've tried to go about doing this a few ways, like overriding the onTouchEvent of the Overlay, and I managed to detect if the map pin was ACTION_MOVEd, albeit in a slighly hack-ish way by getting the event X and Y and checking the offset with the screen co-ords of the pin. Problem there is I don't know how to separate the overlay and the map, as in the map still drags with the overlay.

I was hoping there was a better way to acheive this, but can't find any useful documentation.

Does anyone know how I can acheive this, as the same functionality is fairly simple for iPhone.

Thanks in advance

A.
a.fisher
Freshman
Freshman
 
Posts: 5
Joined: Wed Oct 14, 2009 10:23 am

Top

Postby a.fisher » Mon Oct 26, 2009 10:50 am

Nobody knows?
a.fisher
Freshman
Freshman
 
Posts: 5
Joined: Wed Oct 14, 2009 10:23 am

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 8 guests