Handle tap on MyLocationOverlay current GPS position

by Stu » Sun, 09 Nov 2008 17:15:03 GMT


Sponsored Links
 Hi there.

I'm having trouble handling a tap on my current location in a
MyLocationOverlay. There seem to be functions specifically for this,
but I can't seem to handle it correctly.

My class look like this:

public class MyApp extends MapActivity implements LocationListener {

and when I try to override the dispatchTap() method I get told that it
must override a superclass. I'm assuming it's something to do with the
fact that my class has no link with MyLocationOverlay. I tried adding
it to the list of implements, but MyLocationOverlay is appanrently not
an interface, or something.

Can anyone tell me how I should go about handling a click on the
current location using a MyLocationOverlay, or not using one if it has
to be done a different way?

Thanks and regards,
Stuart.

--~--~---------~--~----~------------~-------~--~----~



Handle tap on MyLocationOverlay current GPS position

by Guillaume Perrot » Mon, 10 Nov 2008 18:31:50 GMT


 Create a MyLocationOverlay subclass, and override dispatchTap().



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Using png image in program

Hi~
Is there a limit color value in android?
When I use png-24 in program, it distortion ( the color value is much
lower, like png-8 or png-16 ), but it's ok when using shapedrawable in
xml.
How can I solve this problem?
--~--~---------~--~----~------------~-------~--~----~

2. 鍥炲: Orientation for Dial og

plz rewritelayout xml. ctrl and f11 can change the orientation.

2009-8-12 5:56 PMquot;jbrohan" <jbro...@gmail.com> 


Hello
I've been working through Hello, Android and Ed Burnette dealt with
this issue in a screen.

I had a file (in this case) main.xml in the res/layout folder. I made
a new folder in res called layout-land and made a new main.xml there.
What happens when you alter the orientation (Ctrl F11 in emulator) is
that the layout-land versions (or the regular versions) of the
appropriate .xml files are accessed. I should think that the rotation
change would precipitate an invalidate() and this would do a redraw of
the whole screen.
John



to develop android appl...

--~--~---------~--~----~------------~-------~--~----~

3. 鍥炲: Play Audio File (sto red in files directory)

4. book page flip transition

5. libdvm segfault

6. add an activity pragmatically in Menifest.xml

7. Equi Size button in linearLayout