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. New Tutorial - Android Activity and sub-Activity

This tutorial (http://developerlife.com/theblog/?p=467) will show you
how to create a sub-Activity from a calling-Activity, and process the
results produced by the sub-Activity, if you want to do so. Also, the
various ways of launching a sub-Activity are covered, along with the
Android Activity history stack. A subclass of Activity is also
provided that makes it trivial to launch sub-Activities and respond to
results from them.
--~--~---------~--~----~------------~-------~--~----~

2. Travian Game, Crop finder for travain

Travian


 http://www.***.com/ 
Travian is a German browser-based game developed by Travian Games
GmbH[1] that is largely based on a predecessor game called Tribal
Wars. In 2006, the game was ranked first in the "best browser-based
game with over 10,000 players" category of the German website Travian
Games.  http://www.***.com/ 
 The game's developers drew roughly from Classical antiquity and
particularly from the Roman Empire to create a pre{*filter*}ly
militaristic real-time strategy. Along with two English versions, and
the original German version, the game has been translated into 30
other languages[2][3], and today has just over 3 million players
worldwide.[4] It is programmed in PHP and runs by definition in the
browser. It was the first game of its type to be playable through a
mobile phone, using a java platform.[5]

 http://www.***.com/ 

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

3. Does the MediaPlayer.getFrameAt(int msec) works?

4. Problems with MediaPlayer under M5

5. New Tutorial - Getting started with Android SDK and tools

6. Information about the ConcurrenModificationException.

7. Showing lists having multiple columns