FAQ Database Discussion Community


Control zoom level when using Google Maps Android Marker Clustering Utility

android,google-maps,android-maps-v2,android-maps-utils
I am using Google Maps Android Marker Clustering Utility to enable clustering for my markers. In order to use this library, i need to set the map's cameraChangeListener to be object of type ClusterManager. The problem is that i want to control the minimum zoom level, so that when zoom...

Google Map not showing up in my app

android,google-maps,android-maps-v2
I recently been updating my app and now my google maps is not showing up. It just shows up blank with the plus and minus buttons and nothing else. My map fragment is: import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.SupportMapFragment; public class BreweryTappedMap extends Fragment { public BreweryTappedMap(){} String beerId = ""; GoogleMap...

findFragmentById(R.id.map) returns null in Android L

android,google-maps,google-play-services,android-5.0-lollipop,android-maps-v2
While testing a location based app in Android 4.4 we were able to properly see and use map via Android maps v2 Since the time I upgraded to Android L it is not able to fetch MapFragment with the following code: In MainActivity there's a FrameLayout in which I load...

Android Google Map how to check if the gps location is inside the circle

android,google-maps,gps,geolocation,android-maps-v2
I'm trying to detect if a user is in the radius of a Marker , using the users gps location. I have the marker's coordinates, but do not know how to calculate whether the user is in the area. I've tried to use the following, but even when the current...

How can I animate a Marker when I put it on the map?

android-maps-v2
I would like to add a small animation to my markers when I put them on the map. Just in the moment when I call: Marker marker = mMap.addMarker(...); Something like a small bounce or similar during half second or so. I don't find the way to get the Marker's...

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...

Google Maps Error - Android app ¦¦ v2

android,google-maps,android-maps-v2
I'm trying to add a map to my layout on an android app but I get the below code: 06-16 20:51:06.142 17581-17581/wk.gon250.dublinbike E/AndroidRuntime﹕ FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start activity ComponentInfo{wk.gon250.dublinbike/wk.gon250.dublinbike.StationDetailsActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class fragment at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2266) at...

Get Latitude and Longitude from SQLite and place respective marker for every two minutes android

android,android-asynctask,android-maps-v2,android-maps,android-runonuithread
Friends, Am able to fetch the latitude and longitude from SqliteDb to place a marker in google Map respectively. But my problem is 1. I want to draw a route from current location to the latitude and longitude fetched from Sqlite Db 2. The db values of Latitude and Longitude...

How to get location from Google Map after dropping Pin over it

android,google-maps,location,android-maps-v2
I'm trying to get location from GoogleMap using ImageView over it. I can drag this Pin image and the position where I drop it,I should get its location. I'm using framelayout with googleMap as it's first child and ImageView(i.e Pin) as its second child element. The same like we have...

Why getLastKnownLocation return old Location?

android,android-maps-v2
I tried create a marker on my location but Google Map shows old location . MapsActivity.java private void setUpMap() { mMap.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title("Marker").snippet("Snippet")); mMap.setMyLocationEnabled(true); LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); Criteria criteria = new Criteria(); String provider = locationManager.getBestProvider(criteria, true); Location myLocation = locationManager.getLastKnownLocation(provider);...

Android Map App not running on Eclipse

java,android,eclipse,android-maps-v2,android-market-filtering
I have an issue to run Android Map V2 project on Eclipse. Whenever I started Eclipse below error shown against my Map project. Dex Loader} Unable to execute dex: Java heap space. And when I clean project it resolve but When I start my project so Eclipse hangs and after...

Error inflating class fragment

java,android,android-fragments,android-maps-v2
I followed all the steps from here: https://developers.google.com/maps/documentation/android/start#specify_app_settings_in_the_application_manifest But I am still getting a crash when executing this code: setContentView(R.layout.map_activity); The code is being invoked by a button click listener, located in my onCreate method. Before pressing the button, everything works as expected, but as soon as i press the...

Unable to setup Google Play Services

android,eclipse,google-play-services,android-mapview,android-maps-v2
I have been stuck over a day to use the Google Play Service. This is a very bad procedure created by Google. Why it is that difficult?? I want to use Google Play Service in order to develop some apps which depends on the Map. I have been tried everything...

Error inflating class fragment- Android Google Map Api V2

android,google-maps,android-mapview,android-maps-v2,android-library
I have been following Android SDK: Working with Google Maps - Application Setup to making an app display google map. I have followed many tutorials, but always end up with the same error! I have also searched around the web and figured my error is something to do with the...

show location on google map android

android,android-asynctask,android-maps-v2,android-location
I've a EditText and a Button I want to find location in map. I'm using AsyncTask to execute here is my calling of AsyncTask class. When I use Toast msg it display my location but in map it was force closed new GeocoderTask().execute(location); Toast.makeText(getApplicationContext(), location, Toast.LENGTH_LONG).show(); Here is my GeocoderTask...

API keys causing issues

android,android-maps-v2
In my android app I am using google map and location services.So I generated API key on google developer console for my development work using SHA1 generated by making use of debug.keystore.It worked fine and google map worked perfectly. When I had to release the apk I signed apk following...

Maps Android API: Authorization failure

android,android-maps-v2
There are many questions similar to mine. i went over them all (i hope). Also i think i'm doing everything OK. Maps v2 worked until last update of Google Services to Rev 25 I'm getting: E/Google Maps Android API﹕ Authorization failure Ensure that the "Google Maps Android API v2" is...

mapFragment.getMapAsync(this) - NullPointerException

android,google-maps,android-maps-v2
I am using com.google.android.gms:play-services-maps:7.5.0 version of Google Maps services. When trying to call the below I get java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.SupportMapFragment.getMapAsync(com.google.android.gms.maps.OnMapReadyCallback)' on a null object reference. @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { SupportMapFragment mapFragment = (SupportMapFragment) getActivity().getSupportFragmentManager()...

getMapAsync() - call once and save the result, or call every time I need the map?

android,google-maps,google-play-services,android-maps-v2
Google Play Services 6.5 added the getMapAsync method, which allows us to asynchronously retrieve the GoogleMap object that backs a MapFragment (or MapView). The documentation states that The GoogleMap object provided by the callback is non-null. I don't have a great understanding of why asynchronous retrieval is required here (i.e.,...

How to update the markers postions on real time

android,google-maps,android-maps-v2,markers,ui-thread
i am making a employee tracker in which i will fetch all employee current Lat long after every 30 sec and update on server and then Admin module will fetch the Lat-long of of each employee from server and update the eisting marker position. So please tell me how to...

toolbar not showing up in fragment with google maps

android,android-fragments,android-maps-v2,android-toolbar
I have an android fragment in which I bring google maps into. I am trying to add a android toolbar to the top. My xml looks like this: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:map="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" > <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:minHeight="?attr/actionBarSize" android:background="@color/primary"...