An Android base class with code to manage the boring necessities of any activity that displays a MapView.
Questions tagged [mapactivity]
192 questions
1
vote
4 answers
Zooming and panning to lat/lng span in map activity
Summary
I need to be able to move from my current mapview to a latitude/longitude span. I want this move to happen in an animated sort of way (similar to how animateTo works). I need to go from my current view, and zoom in or out to end up at the…

RyanInBinary
- 1,533
- 3
- 19
- 47
1
vote
1 answer
Android: How to add menu items to a ActionBarSherlock MapActivity
I am using ActionBarSherlock with ActionBarSherlock-Plugin-Maps in my project. I would like to add menu items to the actionbar of my MapActivity as it is possible for a standard activity that inherits from SherlockActivity. The following code sample…

JJD
- 50,076
- 60
- 203
- 339
1
vote
3 answers
How to catch a map panning | zooming finished event with Android SDK?
I am looking for a way to receive events when a map finished panning or zooming or panning and zooming. Those events are not fired, afaik, from MapActivity in the SDK for Android 2.3.3 which I use. I tried the MapChange library, however, it forces…

JJD
- 50,076
- 60
- 203
- 339
1
vote
2 answers
Android: CalledFromWrongThreadException thrown when broadcast intent is handled
Here is the basic life cycle of my application. It targets SDK version 8 by now, since I am still running Android 2.3.3 on my device.
The application starts, onResume() is called
The method show() is called to display cached data.
A background…

JJD
- 50,076
- 60
- 203
- 339
1
vote
1 answer
NullPointerException in onResume caused by MapActivity?
I'm getting this error only the first time i run my app. Why? Any clue?
Here is my code:
I'm getting user's facebook name and pic in method init() I start a service when a toogle botton is enabled
public void onCreate(Bundle savedInstanceState) {
…

Andrea C.
- 109
- 4
- 12
1
vote
2 answers
Finish Activity - Google Maps Android
I'm doing a project with Google Maps for Android. I've created a MapActivity to load some places I've saved on the server. So I have this class
public class PlaceItemizedOverlay extends ItemizedOverlay {
private…

Luis
- 389
- 1
- 2
- 12
1
vote
2 answers
Android Program add map activity
I have two classes, Syros1Activity and MapActivity
.
In the first activity (Syros1Activity) I have some buttons. The second is Map.
I want to connect one of these buttons and when I select it start MapActivity. Here is my code:
MapActivity:
import…

Baggelisrouk
- 11
- 1
- 4
1
vote
1 answer
MapView / MapActivity crash on some devices
I have gone through Google's MapView tutorial and it works fine on the emulator and for example on my HTC Flyer. But for some reason it immediately crashes when starting it on my mobile phone (Samsung Galaxy I9000).
The crash happens there, because…

Bernd
- 675
- 2
- 8
- 30
1
vote
2 answers
Unclosed Cursor detected
Im getting "unclosed cursor detected" when starting a MapActivity even in the most basic form:
protected void onCreate(Bundle icicle) {
super.onCreate(icicle); // <--- The Exception occurs here
setContentView(R.layout.layout_map);
}
After…

Lisandro
- 10,543
- 1
- 24
- 29
0
votes
2 answers
Errors launching a mapActivity?
Description of problem:
So I have a Main class in the package com.main, the Main.java class contains a button,
package com.main;
public class Main extends Activity {
...
public void onClick(View v) {
switch(v.getId())
{
case…

Zombie_Colonel
- 227
- 1
- 7
- 17
0
votes
3 answers
Cannot launch activity which extends MapActivity
An activity (ShowPos) cannot be launched when it extends MapActivity. If I change to extends Activity, it launches.
It did work earlier, before I copy/pasted the java codes of the project to a new project in a new workspace when suddenly Eclipse…

Tombola
- 1,131
- 5
- 15
- 26
0
votes
1 answer
MapActivity is crashing while running the program
I'm trying to make an App with three options in a menu.
One of them is a Google maps view.
When I click on the Map option of the menu the app will crash.
import android.app.Activity;
import android.content.Context;
import android.content.Intent;…

user1207935
- 5
- 2
0
votes
1 answer
How to remove current location pin from map in android, keeping other pins
I have a map which at the moment I place a custom pin on the map every so often from the GPS position of the user, this is also dependent on when their position changes but with the GPS being a bit choppy here it does it quite a lot. At the moment a…

W0lf7
- 729
- 1
- 8
- 15
0
votes
1 answer
MapActivity doesn't work
On my app i have MapActivity but when i launch it on a virtual device or on my cellphone the app doesn't work.
inside the layout i wrote the APIKey.
i'm sure that the problem isn't the code because i'd download an example from an Android book and it…

yonisha
- 2,956
- 2
- 25
- 32
0
votes
0 answers
Map Activity Error
++i want to use a very simple MapActivity with some points of interest.Im getting this error?Where is my problem?i m sure that i m using the right map key and i have internet and map permissions in my manifest!
12-02 14:24:25.496:…

menu_on_top
- 2,613
- 14
- 44
- 71