FAQ Database Discussion Community


Getting GoogleMaps NullPointerException on SupportFragmentManager

java,android,xml,android-manifest,google-maps-android-api-2
I try to make app that uses googlemaps, but I stack with a NullPointerException at the begining. If i run this app without the GoogleMaps myMap variable i can see the map correctly, but i want to work on my map and just cant understand whats wrong with my code....

Google Map Direction Api using Retrofit

android,gson,google-maps-android-api-2,retrofit
I want to draw the route between two Location. I used the retrofit library to call the API. I didn't get any response. I need the polyline in an ArrayList. How i do that? Need help to create the GsonAdapter also... Thank you..

Android maps V2 tiles disappear when zooming

java,android,google-maps,google-maps-android-api-2
I am using Google Maps V2 for Android and have a tile overlay that gets it's tiles from a server online. This all works great and the tiles are displayed correctly at all zoom levels. The issue I am having is when I zoom in/out the current tile is instantly...

How to change Language on Android google map V2 api

android,google-maps,google-maps-android-api-2
I tried many ways to change language in google maps on android. It's not working.I tried to Change the locale of device with programming,also Force changed the locale of device. What should i do Im using com.google.android.gms:play-services:7.3.0 thank you...

android.view.InflateException Error inflating class fragment

java,android,android-layout,android-fragments,google-maps-android-api-2
I am trying to solve this problem from 5 days, but still I didn't get it solved. Main Java Code package com.beproject.ourway; import android.app.Fragment; import android.app.FragmentManager; import android.os.Bundle; import android.os.Handler; import android.support.v4.app.FragmentActivity; import android.support.v4.widget.DrawerLayout; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ListView; import...

googlemapsv2 white screen

android,google-maps-android-api-2
I developed my first application Turkiye trafik Olayları. My problem is that if I open my application in Eclipse with ether a real device or virtual device, Google maps v2 works perfectly. But if a user installs it, Google maps v2 appears only as a white screen. What could be...

Best library/API to build an Android app making use of offline maps

android,geolocation,maps,google-maps-android-api-2,mapbox
I'm looking for the best library/api solution to use to build an application that uses a mapping system with completely offline map data. I would like to be able to show the user a map that is completely offline, how much storage would be needed for the offline maptiles? could...

how to get using GoogleMap source and target?

android,google-maps-android-api-2
I'm trying create a how to get using GoogleMap. I want trace route of source and target. To do it I have source and target positions with Longitude and Latitude. To do it I created 2 attributes. source and target source is my location and target is where I want...

How to make Android interactive InfoWindow over Google Maps API2 Transparent

android,transparency,google-maps-android-api-2,infowindow
I implemented perfect answer of chose007 to make InfoWindow over Google Maps API2 clickable in my app. The only problem is, that I would like to make InfoWindow transparent (to make it bubble shaped). I can do it with non-interactive InfoWindow using style wrapper: gMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() { @Override public View...

How to add text above polyline in google maps?

android,google-maps,google-maps-android-api-2
I have 2 markers, I would like to draw a line between them, and have a text showing the distance above the line, just like in the web version of google maps. I've already found this sample about drawing a line between 2 markers, but how do I add text...

getSupportFragmentManager().findFragmentById() always returns null

java,android,android-fragments,google-maps-android-api-2
I'm trying to show a GoogleMap in my App but I get problems right at the beginning of this task. The line: SupportMapFragment mapFrag = (SupportMapFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.map); always returns null. I have tried a lot of things but nothing works. Could you please help me to find the Problem? Here...

Google maps V2 if i change my api key in developer console in updated version what will happen to the previous version of my application on playstore

android,google-maps-android-api-2
Google maps V2 if i change my api key in developer console in updated version of my android application. what will happen to the previous version of my application on play store. means the previous key will automatically change or my previous version of application will stop to show maps

Move camera position to fit LatLngBounds with regard to marker height

android,google-maps-markers,google-maps-android-api-2,google-maps-api-2
I want to move camera to position to fit LatLngBounds with regard to marker height. So far I'm able for fit the anchors of markers with this code: LatLngBounds.Builder builder = new LatLngBounds.Builder(); for (Marker marker : markerList) { builder.include(marker.getPosition()); } LatLngBounds bounds = builder.build(); int padding = getActivity().getResources().getDimensionPixelSize(R.dimen.home_map_padding); //...

Google Map Android v2 Zoom Level Detection Inside a Fragment

android,google-maps,android-fragments,google-maps-android-api-2
I am trying to detect the Zoom Level in a Google Map. My Map is inside a Fragment which extends another Fragment. I have implemented the OnCameraChangeListener in my class. This is the Code that I have written to Detect the Zoom Level Change: private float currentZoom = -1; public...

Custom InfoWindow for Android google maps issue

android,google-maps,google-maps-android-api-2,infowindow
I've created a custom infoWindowAdapter class in my Android app that uses google maps.The class uses GetInfoContents and an xml file to create the contents of the infoWindow The xml contains an ImageView and three TextViews, I can manage to add a marker with the custom infoWindow but it will...

Android - Real time location sharing

java,android,mysql,google-maps-android-api-2,google-cloud-messaging
I want to develop a app, through which we can share our real time location with another users who are using same app. I have designed the GUI in which I have showed the friend list and share button in front of each friend. When we click on share button...

google maps V2 “Unfortunately app has Stopped”

android,xml,api,google-maps,google-maps-android-api-2
I just begin to learn Android .take 4 days to try work maps view but not work .that error Unfortunately the app has stopped ...

Crash when trying to run a new thread to add Google Maps markers

android,multithreading,google-maps,google-maps-android-api-2
I am trying to start a new Thread to add markers on the map after parsing a JSON response and storing it in a hashmap. After this async task is finished, I want to add new markers on the map by iterating through the hashmap values and using addMarkers(). When...

Tracing routes in Android

android,google-maps,google-maps-android-api-2
Recently I've been trying this example code I found which helps me to apply in my android application. This is the link to that example code -> http://mrbool.com/google-directions-api-tracing-routes-in-android/32001 However, in that I'm getting an Error in the nodeListStep = elementLeg.getElementsByTagName("step"); and decodePolylines(elementStep.getElementsByTagName("points").item(0).getTextContent()); saying it cannot resolved method. Is there anything...

How to extract the JSON data from the nested arrays? using android

java,android,arrays,json,google-maps-android-api-2
This is my JSON result i need to get the text in duration array. how to get it? { "routes" : [ { "bounds" : { "northeast" : { "lat" : 19.0759817, "lng" : 80.27071789999999 }, "southwest" : { "lat" : 12.5100381, "lng" : 72.8776544 } }, "copyrights" : "Map...

implement android google map in fragment

java,android,google-maps,android-fragments,google-maps-android-api-2
I had implement this code for my app and it will be shown in fragment . I had change the all methods that use FragmentActivity to fragment . but when I run it and go to map fragment its give this error : log file : 03-31 12:10:47.235: E/AndroidRuntime(612): FATAL...

Androids map - Check if center camera is within bounds

android,google-maps-api-3,google-maps-android-api-2
I want to create a method to see if the center of the camera co-ords is within the bounds of an area, if so then do something. When i try this i am getting error: Operator ! cannot be applied to LatLngBounds. I have also tried if(temp != new LatLngBounds(bounds1,...

Google Maps API - Hyperlink in Map Infoview not opening native GoogleMaps

android,google-maps,hyperlink,google-maps-android-api-2,onclicklistener
I am developing a GoogleMap Map with a custom InfoView. In my InfoView, I want a hyperlink opening the native GoogleMap application with my longitude and latitude on Click. I've tried by using the Common Intents API Guide and creating a hyperlink with this syntax: geo:latitude,longitude and in my code:...

Google Maps V2: Does rotating the map change the orientation of TileOverlays?

android,google-maps,overlay,google-maps-android-api-2
Background: I want to draw several Polygons on a map (few thousand coordinates in all). This worked pretty fast on Google Maps V1 by Overlays. But Google Maps V2 seems to be ineligible for that. First of all I tried to add polygons directly to the map by googleMap.addPolygon(myPolygonOptions); but...

List
addresses = geoCoder.getFromLocationName(“Mumbai” , 5); returns zeo

android,google-maps,google-maps-android-api-2
This lines always returns zero even i have changed the places here i have atached my code ! double lat= 0.0, lng= 0.0; Geocoder geoCoder = new Geocoder(getApplicationContext(), Locale.ENGLISH); try { List<Address> addresses = geoCoder.getFromLocationName("Mumbai" , 5); Toast.makeText(MainActivity.this,""+addresses.size() , 5000).show(); if (addresses.size() >= 0) { GeoPoint p = new GeoPoint(...

Android google maps getting rid of polyline

android,google-maps-android-api-2,polyline
I am building an android application that gets the users current position and find nearby attractions. When I select an attraction a route is drawn to it from the current position but when I do this a second time the first route stays there, I want it to disappear. Below...

ClassNotFoundException while using Google Map V2 in Android

java,android,eclipse,google-maps,google-maps-android-api-2
Log Cat 03-11 09:43:55.428: E/dalvikvm(1518): Could not find class 'com.google.android.gms.maps.MapFragment', referenced from method com.example.mapdemo2.MapDemo2.onCreate 03-11 09:43:55.428: W/dalvikvm(1518): VFY: unable to resolve check-cast 696 (Lcom/google/android/gms/maps/MapFragment;) in Lcom/example/mapdemo2/MapDemo2; 03-11 09:43:55.498: D/dalvikvm(1518): VFY: replacing opcode 0x1f at 0x0013 03-11 09:43:55.908: D/AndroidRuntime(1518): Shutting down VM 03-11 09:43:55.908: W/dalvikvm(1518): threadid=1: thread exiting with uncaught...

android google map simple direction app [duplicate]

java,android,google-maps,google-maps-android-api-2
This question already has an answer here: After Google Play Service update to version 13 I got an error 5 answers I am new in android google map and I have found some code in there but when I implement this and set its google map API key and...

Calculate the area of a polygon drawn on google maps in an Android application

android,google-maps,google-maps-android-api-2,polygon
I would like to calculate the are of a polygon drawn in a map fragment for a college project. This is how I draw my polygon. @Override public void onMapClick(LatLng point) { //tvLocInfo.setText("New marker [email protected]" + point.toString()); map.addMarker(new MarkerOptions().position(point).draggable(true).title(point.toString())); markerClicked = false; } @Override public void onMapLongClick(LatLng point) { //tvLocInfo.setText("New...

Why Does Map Marker Lurch Around The Map

java,android,google-maps,google-maps-android-api-2
I'm in Android Studio and I have a map fragment (com.google.android.gms.maps.SupportMapFragment) that has two markers. One is static and called Target. The other tracks my movements and is called Hunter. It works but the problem is that the Hunter marker lurches about. I have the update interval set at 15...

Searching for a specific entity(a specific bank) using Google Places API

android,google-maps-android-api-2,google-places-api
I am working on this android application of finding specific banks(by their names) nearby using Google maps API and i am stuck since am not sure how to do that. I have created a custom list and a map fragment getting the current location.From the custom list is a list...

Adding hotspots with identical lat/long

android,google-maps,google-maps-android-api-2
I'm adding hotspots to my map with the following code: public void addMarker(MyCustomMarker marker) { LatLng latLng = new LatLng(marker.getLatitude(), marker.getLongitude()); mMap.addMarker(new MarkerOptions().position(latLng).title("Marker")); } What are the consequences of adding multiple hotspots with the identical lat/long? Will they both remain on the map and in memory, or will adding a...

android detect various circles on a map v2

android,google-maps-markers,google-maps-android-api-2,android-geofence
In my little app I have a map and i'm parsing an XML from the web, like this: <place> <lat>42.827602</lat> <lon>-1.663957</lon> <place_name>Place one</place_name> <snippet>Snippet de place Facebook</snippet> <thumb>http://www.animage.com/myicon1.png</thumb> </place> <place> <lat>42.830750</lat> <lon>-1.669064</lon> <place_name>Place two</place_name> <snippet>Snippet de place Twitter</snippet>...

how to get the address of center point of GoogleMap v2 in android?

android,google-maps-android-api-2,reverse-geocoding,android-googleapiclient
I following this tutorial to get position of center point of v2 GoogleMap .now I want to get the address of the point using reverse geocoding .... I am using Following code to get LatLang of center point when button is clicked : @Override public void onClick(View view) { if(view.getId()==R.id.btn_set_location){...

Error while running Google maps API V2 example

android,eclipse,google-maps,google-maps-android-api-2
I'm trying to do the example here https://developers.google.com/maps/documentation/android/start I'm working in Eclipse and there are no errors displayed in the code. I have linked the google-play-services-lib and set the project build target as the most recent version of the Google API. I've entered my API key and have turned on...

How to use google maps v2 on Android without load the map

android,google-maps,android-fragments,google-maps-android-api-2
Is there a way to use google maps v2 on android without loading the map, I need to read the gps location when I click on a button, and calculate the distance between 2 points, I know how to do that but only if the map is loaded, I need...

Auto Refresh Traffic Data Google Maps Api V2 Android

android,google-maps,maps,google-maps-android-api-2
I would like to have the app run in the background and check traffic data every hour. Is this possible? I can't seem to find a solution to refresh traffic data in intervals without opening the app. Thank you....

Android google maps marker disable navigation option

android,google-maps-markers,google-maps-android-api-2,android-maps-v2
Im creating an app where users need to walk to a point on a map. But they need to find a route to the point by them selves. Ive created a map with markers but by default if a user clicks on the marker a "start navigation" and view in...

Whats is the usage of SHA1 fingerprint in google map api

android,google-maps-api-3,google-api,cryptography,google-maps-android-api-2
What is the reason for add the SHA1 fingerprint in google api console?

SupportMapFragment with navigationDrawer

android-fragments,google-maps-android-api-2,supportmapfragment
I have an activity that extends ActionBarActivity and has a navigation drawer. This is the xml layout of the activity: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <FrameLayout android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent"/>...

Android Google adresse autocomplete PendingResult awaits forever

java,android,google-maps,google-maps-android-api-2,google-geocoding-api
Me and my project teammates are trying to get an address to autocomplete using the google API for android. So far we're trying to test it with one word without worrying yet of adding a listener to the autoCompleteView. Anyway, we can't make our first test work. Our GoogleAPIClient is...

Directions API total distance & duration with waypoints

android,google-maps,google-maps-android-api-2,google-maps-api-2,driving-directions
I am getting directions including waypoints from Directions API in my Android app. It contains multiple "leg" segments which has its own distance and duration. Is there a way to sum all distances and durations get the total values? Example: Stripped json segment from Direction API legs": [ { "distance":...

Google Maps on Android shows grey screen

android,google-play,google-maps-android-api-2
I had this issue before, where Google Maps shows grey screen and no maps displayed. I fixed this issue by installing google services on the test environment and it works fine. The problem now is that the published app is showing the same grey screen (No maps) for people who...

how to display google map with out having internet connection in android

android,google-maps,google-maps-android-api-2
My google map is not displaying with out having internet connection.google map is not loaded.but getting current location latitude and longitude.how to get google map with out having internet connection.I tried below code. 'public class MainActivity extends FragmentActivity implements LocationListener { private static final int GPS_ERRORDIALOG_REQUEST = 0; GoogleMap googleMap;...

Getting coordinates when GPS is fixed - Android

android,gps,google-maps-android-api-2,locationmanager
I am trying to learn work with location service on android. I used the easiest code which I found and try learn on it how it works. But the problem is when I want put coordinates to textView. Here is Code: package com.example.bakalarka; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import...

Instantiate Google Map Fragment in another activity

java,android,android-activity,android-fragments,google-maps-android-api-2
I have main activity and one fragment. In that fragment, I have used Google Map. I want to know, how to pass instance of map fragment to main activity with java. Because I want to manipulate that map into main activity. I have this class in main activity public static...

What is the URL for multiple paths in google maps api

google-maps,google-maps-android-api-2,google-maps-api-2
I'm trying to enable the alternative routes between two points , i tried with this link http://maps.googleapis.com/maps/api/directions/json?origin=Chennai,%20Tamil%20Nadu,%20India&destination=Kodambakkam,%20Chennai,%20Tamil%20Nadu,%20India&sensor=false&alternatives=true it is not giving any alternative routes.i'm working with android . can anyone give me the URL for alternative routes...

Is it possible to get the longitude, latitude and timestamp from google maps API for the places travelled in the past?

android,google-maps,google-maps-android-api-2
I was thinking of building an app for a hackathon, in which I need to know if it is possible to get the location coordinates and the timestamp of those coordinates. For example say, X was at A in time p and at B in time q, now can I...

FATAL EXCEPTION: ZoomTableManager

java,android,google-maps-android-api-2
I'm getting a strange crash and I'm having trouble finding anything about it on Google. Searching ZoomTableManager returns no results at all. E/AndroidRuntime﹕ FATAL EXCEPTION: ZoomTableManager Process: com.xxx.yyy, PID: 22129 java.lang.IllegalMonitorStateException: object not locked by thread before notify() at java.lang.Object.notifyAll(Native Method) at com.google.maps.api.android.lib6.gmm6.m.k.a(Unknown Source) at com.google.maps.api.android.lib6.gmm6.m.l.run(Unknown Source) ...

Android google maps, hot to make a polyline between 2 points be a curved line

android,google-maps,google-maps-android-api-2,polyline,google-polyline
This is my code for the map: ArrayList<LatLng> points = new ArrayList<LatLng>(); PolylineOptions polyLineOptions = new PolylineOptions(); points.add(startPosition); points.add(endPosition); polyLineOptions.width(7 * Constants.density); polyLineOptions.geodesic(true); polyLineOptions.color(getResources().getColor(R.color.flying_color)); polyLineOptions.addAll(points); Polyline polyline = mMap.addPolyline(polyLineOptions); polyline.setGeodesic(true); polylines.add(polyline); But even if I set geodesic as true, it still...

Best way to put a map (google maps v2) inside a fragment

android,android-fragments,google-maps-android-api-2
I have a fragment (ApartmentFragment) which is a page that show details of an apartment. I want to add a little map to show where the apartment is. just for clarity, I'm using the MaterialNavigationDrawer that is on github, my app is composed by a single Activity (the navigation drawer)...

Android simple directions between two points

java,android,google-maps,google-maps-android-api-2
I want to have directions between two points in Google Maps that is implemented inside my app. I have used a simple class that I found online. When I run the code it's throwing this error: log file : 02-27 19:33:52.819: E/AndroidRuntime(1871): java.lang.RuntimeException: Unable to start activity ComponentInfo{info.androidhive.googlemapsv2/info.androidhive.googlemapsv2.MainActivity}: java.lang.NullPointerException 02-27...

Changing infoWindow view depending on click listener

android,google-maps-android-api-2
I am trying to implement a Google Map marker with infoWindow that if someone clicks on this infoWindow, it plays a song and if clicks again, it stops. To visualize this, I write a custom infoWindow layout. There is, in infoWindow, you can see user and track info with a...

Why Google Maps can not be displayed?

android,json,maps,android-manifest,google-maps-android-api-2
I had a problem like this in logcat : 01-27 18:27:12.403: E/AndroidRuntime(3938): FATAL EXCEPTION: main 01-27 18:27:12.403: E/AndroidRuntime(3938): java.lang.RuntimeException: Unable to start activity ComponentInfo{in.wptrafficanalyzer.locationmarkermysql/in.wptrafficanalyzer.locationmarkermysql.MainActivity}: android.view.InflateException: Binary XML file line #11: Error inflating class fragment 01-27 18:27:12.403: E/AndroidRuntime(3938): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) 01-27...

Android studio, Google Maps: V2 maps not fully loaded

android,google-maps-android-api-2
Me and my team have a problem on google maps in Android Studio. The maps showed is able to zooming up to a certain point. After maps remains pixelated (zooming up maps does not loading). We have tested in many devices, in a tablet for example some maps regions are...

Android : Error inflating class fragment

java,android,android-layout,android-fragments,google-maps-android-api-2
XML layout file <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context="com.gaurav.googlemap.HomeMap" > <TextView...

Google Maps Android API v2 only shows tiles when I touch the screen

android,google-maps-android-api-2
Problem When application starts, it shows a white Google Map (I can see the Google logo), and even waiting for minutes with a good internet connection it doesn't load tiles. However, if I touch the screen, tiles start appearing (One tile per touch). I tested with 3 physical phones, getting...

Google Maps for Android overlapping

android,android-fragments,google-maps-android-api-2,overlapping
I have really strange problem with Google Maps Android API v2. It shows up only on Samsung Galaxy S5 (with Android 5.0 or 5.1.1) and on Sony Xperia M2 Aqua. I have two fragments with maps and I'm switching them (using FragmentTransaction.replace) in MainActivity. When I switch from ContactFragment to...

Android : add numbers to map markers

android,google-maps-markers,google-maps-android-api-2
I'm working on a map that has multiple markers on it. These markers use a custom icon. Is there a way to add numbers to these icons ? edit: here is an example of what I want to do I want to generate these icons programmatically and add them to...

customize android google map direction line

java,android,google-maps,google-maps-android-api-2
I had implemented this code for google map direction between two poin . now I want to customize this line between this two point . but I can't see any API or value for this work . how can I customize this line color , width , .... thank you...

Google maps API v2 to v3 directions/info panel

google-maps,google-maps-api-3,google-maps-android-api-2
how can I get something like this on gmaps v3 api? https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d183936.18701586724!2d15.498622262704465!3d43.917913576992646!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x6e7b774ca6e9b29a!2sPine+Beach+Pako%C5%A1tane!5e0!3m2!1shr!2shr!4v1394620132966 so the problem I'm having is that I cannot get the top left panel there? With the info, directions and that stuff. Am I missing something?...

How do i zoom in automatically to the current location in Google map api for android?

android,google-maps-android-api-2
I have integrated Google maps Api in android studio , and it also finds the current location , but I want to increase the zoom level , so that I can view my current location more clearly and precised. How do I increase the zoom level? You can find my...

how to move camera position in maps from activity

google-maps-android-api-2
I have this method in map fragment public static void animateToLocation(final double latitude, final double longtitude) { animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude, longtitude), 12.0f)); } I access the third method from activity like this: FragmentMap.animateToLocation(lat, Lang); When I call method from fragment with button click, it works well. The problem i am having...

Android GoogleMap V2 : How can I draw a line with specific length?

android,google-maps,google-maps-android-api-2,polyline
I have a GoogleMap in my project. It's set in zoom level 18. I want to draw a line that is 1 meter in length. I saw and use a code Like this: googleMap.addCircle(new CircleOptions() .center(latLng1) .radius(5) .fillColor(Color.BLUE)); I gave it's radius in meters. how can I do it with...

Google Map Fragment overlays another fragment

android,google-maps,google-maps-android-api-2
Basing on the code given here my app implements the Google Maps V2. The problem is that I have this fragment-based menu (sorry if I misspelled the concept) that gets overlayed by the Google Maps fragment after a very short time. Is it possible to make the Google Maps fragment...

Android Google Maps API v2: get my bearing location

android,google-maps,google-maps-android-api-2
I would like to force the camera to behave like you are using navigation, it means when you rotate 90° left, the camera does the same thing. I have a Google Map where my location (as a blue dot) is shown. mGoogleMap.setMyLocationEnabled(true); When I am moving, blue dot is with...

Why is SupportMapFragment is null (support back to API 9)

android,android-fragments,google-maps-android-api-2,android-support-library,supportmapfragment
I have created a Github project that demonstrates the issue. git clone https://github.com/anujgoyal/buggymap.git I realize there are existing questions, but very few of them have distilled the program down to this level. In addition I have a hard requirement to use the android.support.v4.app.Fragment class, not FragmentActivity, not MapFragment. Note that...

Detect deviation from selected route in android map

android,google-maps,google-maps-api-3,google-maps-android-api-2
I want to draw route between two points. I did this successfully. But how to know if the user deviated from drawn path or not. So that I can suggest user to notify alternative path to reach their destination. Like what google map navigation did. Am working on it and...

Start the map app with my current location

android,google-maps,google-maps-android-api-2
This is my Activity: import android.location.LocationManager; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; public class MapsActivity extends FragmentActivity { private GoogleMap mMap; // Might be null if Google Play services APK is not...

Android Google Maps API v2 some Markers not showing

android,google-maps-android-api-2
I'm trying to draw markers on the map which will be removed and redrawn as updateMap() is called, but some markers are not being drawn. Does the Android Google Maps API v2 prevent drawing markers that are too close to one another? It has no problem drawing the points when...