wood burning stoves 2.0*
The moose likes Android and the fly likes Mapview Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Mapview " Watch "Mapview " New topic
Author

Mapview

Akil Kumar
Ranch Hand

Joined: Jun 08, 2009
Posts: 83
Hello,

I have a dashboard for my android application. All the activities related to the dashboard feature extend from one base activity class. I have several features within the dashboard. GPS/ Maps is one of them. If user clicks maps I would like to display map with current latitude and longitude. In order to implement map it needs to extend the MapActivity class. In this case the GPS / Maps is already extending the base activity class. Since Java does not support multiple inheritance, how should handle this case? Can anybody provide some help? Or is there any other way to use maps in the application?

Thanks,
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41107
    
  45
Since those are two different Activities, why couldn't they extend two different base classes?

Besides, to show a map, I don't think you need to extend MapActivity - you can just keep a MapView in your layout.


Ping & DNS - my free Android networking tools app
Akil Kumar
Ranch Hand

Joined: Jun 08, 2009
Posts: 83
If I use the map view then I need to choose the target as google API's instead of android while running the application. But for my application I need the target AVD as android. My question is how can I display map with the target set to android?

Thanks,
 
 
subject: Mapview
 
Similar Threads
Another singleton - should I use it?
variables one class accessed through another class???????
Is there any chapter in your book for dealing with GPS and Map ?
google maps application using java
How to call an activity in another application using intent?