Questions tagged [mapfragment]

The Android Fragment that represents a Map component in an Android app.

240 questions
1
vote
2 answers

Null pointer exception in android google maps

I'm trying to add google maps to my app. The logcat window shows this error: Caused by: java.lang.NullPointerException at com.example.mymaps.MainActivity.onCreate(MainActivity.java:27) at android.app.Activity.performCreate(Activity.java:5104) at…
1
vote
0 answers

When I add MapFragment inside child view of ExpandableListView InflateException occur

I add map using MapFragment inside child view of ExapndableListview. When i scroll expanded child then MapFragment is loaded, so that InflateException occur. How to add map inside child view of ExpandableListView in Android?
Aline
  • 41
  • 4
1
vote
0 answers

Android M, loading a MapFragement without ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION

I am working on an Android M project where the user gets prompted for Location permission to view a map, in case of denial I would like to show just a U.S continental view (without the user's location), for some reason I am not able to achieve that.…
MR Mido
  • 1,618
  • 4
  • 25
  • 35
1
vote
1 answer

MapFragment ArcGis - The specified child already has a parent

I'm trying to display a MapView from ArcGis in Android Studio. I'm using Map Fragments for that, I put in the xml the Map and my other UI stuff. Putting the MapView element in the layout file always crashes, so I'm doing it this…
aikaSan21
  • 85
  • 1
  • 7
1
vote
2 answers

Hide map borders and labels in android MapFragment

I have a MapFragment object that I would like to modify, so that all the labels: county,street and such wont be visible. also the borders of the counties wont be visible... so that I'll get only the topography. how could I do that?
1
vote
2 answers

android - getFragmentById returns null

I'm trying to get the mapFragment that's in another fragment, but when i call findFragmentById, it only returns null, i'm trying to get it so i can remove it from the fragmentmanager (in the onDestroyView method) but it throws a…
MichaelD
  • 107
  • 1
  • 1
  • 9
1
vote
1 answer

why geocoder.isPresent() is returning false?

Here is my code. Please tell me solution. I tried all possible solutions that stackOverFlow describes previously. I want to get Latitude and Longitude values from an user entered Address. public class MainActivity extends ActionBarActivity { …
1
vote
1 answer

Google Map Fragment and AdMob, Map Location button is under the Ad

Hi I have a layout which has a menu bar at the top, then a map fragment and then an AdMob banner. It all displays almost as wanted, except for some reason the Get Location button in the MapFragment is mostly hidden underneath the adMob banner. Even…
Profes
  • 93
  • 1
  • 9
1
vote
1 answer

What is wrong with SupportMapFragment?

I have adt x86-64 mac os. I did everything from maps v2 documentation but i still get: 09-28 03:07:11.755: E/AndroidRuntime(549): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment…
1
vote
1 answer

Getting a blank Google map in V2

I'm using Google map V2 in my project, I'm instantiating map in baseadapter class (setting in listview), Layout file:
1
vote
0 answers

Android - Fatal Signal on simple MapFragment app

I am creating a small exercise application and in it I am using the Google Maps API V2. I have got everything setup correctly from switching the API on to getting a debug API key. The code is the most basic code too: XML
Donal Rafferty
  • 19,707
  • 39
  • 114
  • 191
1
vote
2 answers

MapFragment returns Null

I have an activity and MapFragment Class.I have created MapFragment Object in Activity.When I tried to get mapFragmentObject.getView() it is returning Null.But i have created MapFragment like this @Override public View onCreateView(LayoutInflater…
1
vote
1 answer

Google map View not working

I'm triying to use google map on my Android App and I have some problems, First my class Geoloc.java : public class Geoloc extends MapFragment { private MapView map; private GoogleMap nmap; private static final String TAG =…
1
vote
1 answer

How to load resources to test project which is using robotium?

I have a layout file map_layout.xml in my android application. which holds MapFragment. I want to use this fragment in my test project using Robotium. Objective is to click the markers for testing purpose. I am getting the ID but not able to get the…