The Android Fragment that represents a Map component in an Android app.
Questions tagged [mapfragment]
240 questions
0
votes
2 answers
How to include Googlemap fragment in a Fragment class?
I want to add markers and draw a polyline between two locations in the map, The issue is an exception is thrown when I try to refer the Googlemap from the Fragment class..
It's like this, I have a class which extends the Fragment class and the view…

chinthana
- 183
- 1
- 3
- 9
0
votes
1 answer
Can't make google maps v2 work with min sdk 8
Hello,
I've already read a lot of responses on how to make maps work with lover than 11sdk, but i did everything and i still can't make it work. My minsdk is set to 8. I always get error like this:
Manifest merger failed : uses-sdk:minSdkVersion 8…

Edvinas Kavaliauskas
- 63
- 5
0
votes
1 answer
MapFragment make app crashes at runtime when I try to setMapType
I have trouble trying to change the type of a GoogleMap in an Android application. I have a basic action bar menu and I would like a map to be placed as a Fragment in my activity when I select the right option in the action bar. Here is my code…

jlncrnt
- 46
- 5
0
votes
1 answer
Android - MapFragment with TextView and Button on top
I am trying to make the mapfragment work such that the map shows beneath the button and the text view.
With the layout below, the map works but the button and the text view take up space at the bottom of the screen.
I have tried various options like…

user2260040
- 1,275
- 1
- 13
- 26
0
votes
1 answer
Display label over Google Map
I'm having problems displaying a TextView over my Google Map. I add the MapFragment programmatically in a FrameLayout during onCreate method and the TextView is in the XML file. For what I can see, the TextView is properly displayed but the…

user3476114
- 634
- 1
- 7
- 17
0
votes
2 answers
MapFragment not respecting matchparent
I have a scrollview that contains a section for an address, some buttons, and a map that I want to be displayed in the following format:
Here is the result I get instead:
For some strange reason I can't force the MapFragment to respect the…

Eddie K
- 503
- 4
- 18
0
votes
2 answers
Class Cast Exception from MapFragment to Fragment in android google maps api v2
Alright, here I am trying to make this app consisting of a navigation drawer and a map fragment.
My aim is to click on an item in nav drawer and it takes you to specified coordinates on the map.
But I'm encountering this Class Cast exception when…

Ashish Sharma
- 13
- 5
0
votes
1 answer
Always return NPE when using Map Fragment
I'm using the below code to try and add a marker to a location after converting a string address into a LatLng. But the app always crashes with a NPE error. I tried debugging and it shows error at the lines shown by comments.I confirmed that none of…

Androider
- 61
- 1
- 2
- 9
0
votes
1 answer
MapFragment crashes inconsistently
The below activity gets data from my parse database and displays it. I have a function getLocationFromAddress() to convert a string address into LatLng format. The function prepareMap() then makes a marker and then points to that location on the…

Androider
- 61
- 1
- 2
- 9
0
votes
1 answer
MapFragment layout_height can't find solution
I have a problem with my layout that contains 2 fragments: "map" -top fragment and "fragmentLayout with details" - bottom one.
I want my map fragment to margin from top to second layout on the bottom, but i can't find the proper solution. My bottom…

Steve
- 415
- 2
- 8
- 24
0
votes
0 answers
calling getMap() inside nested mapfragment gives nullpointerexception
I have a mapfragment inside a custom fragment, by calling it like in the answer provided here
Unfortunatly there's a NullPointerException, if I call the getMap()-Method (see attached code). Has anybody an idea why? Thanks for your help!
private void…

Robin
- 709
- 2
- 8
- 20
0
votes
4 answers
Add custom button to MapFragment with the same style of Maps app
I need add some custom buttons on my MapFragment.
I use this code:

Martin
- 1,065
- 1
- 17
- 36
0
votes
1 answer
Error inflating class fragment in google map v2
i have serious problem with the issue of google map v2.
Here is my code
MainActivity.java
package com.example.newsimplemap;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import…

kamel Salah
- 31
- 10
0
votes
1 answer
Map cannot be resolved: is not a field on (R.id.map)
I am a beginner in Android programming. I have an error on the project MapFragment. Even though they had followed the tutorials on Google. I've imported the Google library project and play service on my eclipse. Is there anything that can help?
map…

djarod22
- 39
- 1
- 5