Questions tagged [mapfragment]

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

240 questions
62
votes
7 answers

Android Google Maps: disable dragging in MapFragment

Can I disable drag functionality when the user tries to drag the map with his fingers without disturbing the Zoom in and Zoom out? Any one please suggest an idea of doing this! Thanks for your Precious help!!
Mahe
  • 2,707
  • 13
  • 50
  • 69
56
votes
16 answers

Moving MapFragment (SurfaceView) causes black background flickering

I'm trying to implement new Android Google Maps API (v2). However it doesn't seem to go well with SlidingMenu. As you may know, MapFragment implementation is based on SurfaceView. The problem is that the SurfaceView doesn't like moving it around - I…
52
votes
2 answers

Should I use MapView or MapFragment

I am not sure whether I should be using MapView or stick to using a MapFragment. My application is an app that finds the nearest set of places that are closest to you. I want to be able to add locations, display details of a marker when I press a…
36
votes
3 answers

How to disable the map rotation feature in the Android Map Fragment

I use the Google Maps Api Version 2 for Androidto add a MapFragment to my Application. This Fragments improves a lot in terms of speed and API usability. Sadly it also allows to rotate the map with a two finger gesture. I want to disable the…
Janusz
  • 187,060
  • 113
  • 301
  • 369
27
votes
8 answers

MapFragment in Fragment, alternatives?

I need your help... I work on it until 3 days. My app is working with fragments. One of these fragments has to display a map from the Google Maps V2 api for Android. Currently, I'm using a MapFragment, but no surprise, a fragment in a fragment is…
Kyu_
  • 800
  • 4
  • 10
  • 18
15
votes
1 answer

Differences between MapView, MapFrament and SupportMapFragment

I would know the differences because I'm developing an app and I would introduce Google Map API v2 for compiling above Android 2.3. Which should I use?
Viherbar
  • 239
  • 3
  • 13
11
votes
1 answer

How do I get the coordinates of a map on tap with MapFragment (not MapView)?

I have searched around on how to get the coordinates of a location when the map is tapped. However, most, if not all the examples require a MapView as a parameter. For example: public boolean onTap(GeoPoint p, MapView map){ if ( isPinch ){ …
10
votes
4 answers

How to preserve/rebind event listeners on MapFragment after rotating the device (portrait / landscape)?

I am developing an Android app with Xamarin (version 7.1). It displays as map and draws PolyLines, doing so in OnCameraIdle(). The MapFragment is generated programmatically in OnCreate. I am fetching the GoogleMap in OnResume via GetMapAsync and…
Imanuel
  • 3,596
  • 4
  • 24
  • 46
10
votes
1 answer

Map of MapFragment gets loaded with lag when returning from another activity

As far as I can see, MapFragment has an issue with transition animations. All views on the layout are getting shown immediately, including the MapFragment's own views (like zoom buttons). But the map itself gets loaded with a lag only after the…
10
votes
4 answers

Mapfragment findFragmentById always null

I have problems to access the fragment of the map. getFragmentManager().findFragmentById(R.id.map)) returns always null. I don't know why. What's the problem? Thank you!
user1852854
  • 199
  • 1
  • 1
  • 11
9
votes
0 answers

Switching fragments - Google Map Fragment V2 - Activity has been destroyed Error

I have a Maps Activity (SherlockFragmentActivity) that loads in a Maps Fragment that has 2 buttons and switches between showing 2 different fragments (GoogleMapFragment & ScaleImageViewFragment) When I click the Exhibitor Map button it replaces…
9
votes
1 answer

ClassNotFoundException reading a Serializable object in a class extending MapFragment in onSaveInstanceState

I have a class extending the SupportMapFragment where i load some data from backend and display the Markers. I also have another fragment which i display the details corresponding to the selected marker on the map. I am displaying the details…
Jovy
  • 101
  • 1
  • 4
8
votes
2 answers

Pulse ring animation around a Google Maps marker in Android

I want to add a pulse ring animation on blue dot current user location in Android google mapFragment (like Uber). Can anybody help me with this thing?
sunil
  • 796
  • 1
  • 8
  • 28
8
votes
0 answers

SupportMapFragment loads extremely slowly the first time, but quickly in subsequent loads (including different Activities)

My app has three different Activities that use a SupportMapFragment. There is a major delay on the first load after starting the app. This slow load time does not occur on subsequent loads, even if I go back and access a completely different…
theblang
  • 10,215
  • 9
  • 69
  • 120
8
votes
3 answers

Android Map API v2 not showing Map on some Devices

I am developing an Android application showing a map. I'm using a MapFragment in which I display my map. I obtained an API Key and added all the needed permissions to my manifest. So far so good, everything works fine when debugging the app on my…
Philipp Jahoda
  • 50,880
  • 24
  • 180
  • 187
1
2 3
15 16