The Android Fragment that represents a Map component in an Android app.
Questions tagged [mapfragment]
240 questions
1
vote
1 answer
Android - Adding several MapFragments dynamically
For my application I have to achieve something near from a launcher : I have to provide the ability to add, remove, resize and drag n drop dynamically some UI elements (let's call them "widgets", but they are not Android AppWidgets) . It works…

Tim Autin
- 6,043
- 5
- 46
- 76
1
vote
1 answer
Adding a marker to a Google maps fragment
I have added a map fragment to my application and added the following code to place a marker on the fragment.But I'm getting errors in the code snippet.I have included all relevant imports.
The errors are compile time and are as…

Brian Var
- 6,029
- 25
- 114
- 212
1
vote
2 answers
Function getMapCenter in MapFragment / get MapView from MapFragment
I have a MapFragment in my Android app and now I would like to know the min and max lat/long that is shown on the map actual.
I found this solution:
If you want to find out the longitude latitude of the corners of the MapView you could use:
Point…

padalton
- 108
- 1
- 8
1
vote
3 answers
Google Maps API v2 Custom MapFragment + SimpleFragment
I need to create a simple application which contain
1. Custom MapFragment which can display current location (LocationListener?), two markers, etc.
2. Simple empty Fragments.
The application must not use support v4 (sdk 11+) /…

Yuriy Aizenberg
- 373
- 9
- 28
0
votes
0 answers
Refresh The google Map coordinates?
Google Map is not Refreshing .Google map Loading previous map. I'm using That methods :-
1:- override fun onDestroyView() {
super.onDestroyView()
if (mMap!= null) {
mMap!!.clear()
}
}
2:- override fun onResume()…

Sukhwinder Kaur
- 21
- 2
0
votes
1 answer
java.lang.IllegalStateException: Fragment MapFragment{2fe7116} (69b05d78-5cf3-46a9-829c-6b6507944575) not attached to an activity.?
I am developing location based android app using google maps but when I run project I am getting crash and getting following exception java.lang.IllegalStateException: Fragment MapFragment{2fe7116} (69b05d78-5cf3-46a9-829c-6b6507944575) not…

Edgar
- 860
- 1
- 17
- 38
0
votes
0 answers
Showing multiple markers on google mapfragment via an array list
I have an arraylist of latitude and longitude and I am trying to put a marker at different places using the values of my array list; but nothing is showing on map when I run the below code.
for(int x = 0 ; x < latlong.size(); x++){
place1 = new…

VN Gamer
- 3
- 3
0
votes
1 answer
Why MapFragment is not recognized by visual studio?
I have a map inside a scrollview and when we try to scroll around the map, scroll view comes up and scrolls itself but not the map. I'm trying to fix this issue with a code that I found on google but visual studio is showing some errors:
Error…

Sandro Benevides
- 581
- 2
- 14
0
votes
1 answer
Inflate multiple views to display multiple MapFragments
I have an xml layout which includes the following code:

George
- 389
- 5
- 17
0
votes
0 answers
Programmatically adding map fragment to container adds it to the bottom
I have a contact application. A contact can have multiple addresses. When viewing a contact, a loop iterates through the database data and adds the address(es) to a container, as shown in the image. However, I don't understand why the fragments are…

George
- 389
- 5
- 17
0
votes
2 answers
MapView being shrunken when adding buttons to a MapView fragment
I am trying to create a Map App that allows you to switch between map and satellite view using two buttons. However, when I add the two buttons the map is being shrunk down to not take up the full screen of the device.
Shrunken Map
How can I make it…

hippoman
- 187
- 2
- 10
0
votes
1 answer
Make Google Maps API Default Marker Smaller
Im using Google Maps API in my app and placing a lot of markers on the map.
I need to make the size of the markers smaller, so they won't cover the whole country.
Note that i gotta use the default marker BitmapDescriptorFactory.defaultMarker
because…

Dor Sloim
- 99
- 1
- 7
0
votes
1 answer
how to use PlaceAutocompleteFragment and mapFragment in same screen
This is my .xml

developer
- 125
- 1
- 2
- 9
0
votes
1 answer
ERROR: Cannot initialize Map Fragment UNKNOWN HERE SDK
I just wanted to test the Here-SDK 3.4.0_165. I took this project https://github.com/heremaps/here-android-sdk-examples/tree/master/3d-venues-and-indoor-routing and used the manifest from here…

elpatricko
- 488
- 5
- 17
0
votes
1 answer
I am trying to plot some points on a Map, however they are not showing when I run my application?
This is the Java Code that I have for plotting the points on My Map which I have included in my Home Fragment XML which is also below, The Map is showing well when I run the application, the zoom which I have also set is not working, is there…

S.Doyle
- 215
- 3
- 17