Tag: google-maps

Android Polyline – Adding point by point

I’m currently having a map, and each 10 meters I use LocationListener to refresh my location and get the new Latitude and Longitude. Now I wish that the route the user is taking will be displayed with a red line. So everytime the OnLocationChange() from LocationListener class is called, I want to update the map […]

Android studio v0.3.2, gradle, google maps v2.0 Didn't find class “com.google.android.gms.maps.MapFragment

I have problem with Google Maps Android v2.0. Because i try a lot of options and I always get this stacktrace: 1-03 17:39:26.015 2398-2398/com.** E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{com.**/com.** .MainActivity}: android.view.InflateException: Binary XML file line #24: Error inflating class fragment at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) at android.app.ActivityThread.access$600(ActivityThread.java:141) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) at android.os.Handler.dispatchMessage(Handler.java:99) […]

Android OnInfoWindowClickListener() never called

I’m creating an application with new Google Maps API V2 and I have to intercept the click on InfoWindow, showed when a Marker is clicked. Reading the documentation I assumed that I do that to listen to InfoWindows clicks : mGoogleMap.setOnInfoWindowClickListener(new OnInfoWindowClickListener() { @Override public void onInfoWindowClick(Marker marker) { Log.d(“”, marker.getTitle()); } }); But unfortunatly […]

How to show pop up on clicking map overlay?

I want to show a custom image with some data in it while clicking map overlay that i have added to google map in android. Can any one guide me how can i create that custom image or thing to be displayed on google map with some data on it? some body told me to […]

Get Map address or Location Address in Android

I am writing an app that requires to get the current map location. My Map file works fine by it self, but I need to get the address (see addressString below at the buttom) from another Activity. I tried getAddress/setAddress (setters/getters). They do not work. They always return ‘no address’ (the default). Here is my […]

error: cannot find symbol method getMap() after dependencies update

After I updated my dependencies my getMap() won’t work. (it used to work just fine before update) Here is the line of codes i get error GoogleMap map = ((MapView) mRootView.findViewById(R.id.fragment_map_mapview)).getMap(); Location locationNet = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); Location locationGps = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); The grandle code dependencies { compile ‘com.android.support:support-v4:24.0.0’ compile ‘com.android.support:appcompat-v7:24.0.0’ compile ‘com.android.support:cardview-v7:24.0.0’ compile ‘com.android.support:recyclerview-v7:24.0.0’ //compile ‘com.google.android.gms:play-services:7.3.0’ compile […]

Android : Providing auto autosuggestion in android places Api?

I am very new to android Google maps i write the following program for displaying the auto sugesstion in the android when i am type the text in the Autocomplete text box it is going the input to the url but the out put is not showing in the program .please see once and let […]

Android animateCamera GoogleMap.CancelableCallback Usage

im totally stumped how to use the callback feature of “animateCamera” in android sdk. i want to use the onFinish feature, thankyou. public final void animateCamera (CameraUpdate update, GoogleMap.CancelableCallback callback) http://developer.android.com/reference/com/google/android/gms/maps/GoogleMap.html#animateCamera%28com.google.android.gms.maps.CameraUpdate,%20com.google.android.gms.maps.GoogleMap.CancelableCallback%29 http://developer.android.com/reference/com/google/android/gms/maps/GoogleMap.CancelableCallback.html

Find route with Androids Google Maps API

I want to be able to display the route between two user-defined geographical points using the Google Maps API for Android. I also want to be able to let the user choose what type of route to display, whether it be walking, cycling, car etc. Additionally, I want to be able to calculate the time […]

google map api v2, and older version of google play services lib

I am going to use maps in my android application and I should use google play services. I read lots of q\a here like this. In the mentioned question, the accepted answers suggets using older version of google play services lib, like the one for Froyo. I downloaded google play services r10 and used it […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.