google-maps-android-api-2

Using one Google Maps API key for different android applications

跟風遠走 提交于 2020-01-13 09:26:06
问题 I just generated the Google Maps API key to use in my android app. I had to provide the SHA-1 fingerprint and the package name for the application. It looked something like this: BB:0D:AC:74:D3:21:E1:43:67:71:9B:62:91:AF:A1:66:6E:44:5D:75;com.example.android.mapexample As you can see I had to provide the package name for the app. So, does this mean that I need to get a different API key for different applications? PS: Curiously, somehow, Google generated two API keys for the SHA-1 and package

ClusterManager setOnCameraIdleListener

我的梦境 提交于 2020-01-13 00:50:14
问题 While trying to implement use ClusterManager , I noticed that the getMap().setOnCameraChangeListener(clusterManager) is deprecated. Looking at the android-maps-utils sample on Github, I noticed that getMap().setOnCameraIdleListener(mClusterManager); When I try doing the same, I get an error because the default ClusterManager class doesn't implement GoogleMap.OnCameraIdleListener . Yet, in my gradle file, I am using what seems to me, the latest maps-util libraries: dependencies { compile 'com

Android Placepicker 2019

孤人 提交于 2020-01-11 12:15:01
问题 The Android Placepicker is deprecated since last month. How do i get or build a simple lat/long coordinates (place-)picker with the "new" Google Maps Platform (API)? 回答1: Here's a codelab for building a place picker from scratch with nearbyPlaces query: https://codelabs.developers.google.com/codelabs/location-places-android/ 回答2: Here is what i did. I have used this tutorial to implement the mapView. CodeLab Tutorial Link: https://codelabs.developers.google.com/codelabs/location-places

Android Placepicker 2019

折月煮酒 提交于 2020-01-11 12:14:10
问题 The Android Placepicker is deprecated since last month. How do i get or build a simple lat/long coordinates (place-)picker with the "new" Google Maps Platform (API)? 回答1: Here's a codelab for building a place picker from scratch with nearbyPlaces query: https://codelabs.developers.google.com/codelabs/location-places-android/ 回答2: Here is what i did. I have used this tutorial to implement the mapView. CodeLab Tutorial Link: https://codelabs.developers.google.com/codelabs/location-places

How to trigger custom info window programatically in Android

点点圈 提交于 2020-01-11 09:15:10
问题 I use custom window info, however, calling marker.showInfoWindow(); always renders default window info, whilst if the user clicks on the marker, custom window info are rendered without problem. Can I programatically open my custom window info? My case is that when the markers are drawn on the map, one particular marker should show its window info (so no user interaction), but preferably a custom one, as defined in my CustomWindowInfoAdapter class. EDIT, would gladly delete this question, it

How to change language in android google maps v2 programmatically

℡╲_俬逩灬. 提交于 2020-01-11 07:38:50
问题 I have an app where you can change the locale from the settings (the purpose is to be able to have a locale inside the app that is different from the system locale) and I would like to be able to set the map's language as well. I could only find answers like "set the system language of your phone", which is not what I am looking for. Is there a way to set the map's language programmatically or from xml? public class LocalizedActivity extends FragmentActivity { private GoogleMap map; protected

How to change language in android google maps v2 programmatically

家住魔仙堡 提交于 2020-01-11 07:38:06
问题 I have an app where you can change the locale from the settings (the purpose is to be able to have a locale inside the app that is different from the system locale) and I would like to be able to set the map's language as well. I could only find answers like "set the system language of your phone", which is not what I am looking for. Is there a way to set the map's language programmatically or from xml? public class LocalizedActivity extends FragmentActivity { private GoogleMap map; protected

Still Gets “Couldn't get connection factory client” Error

∥☆過路亽.° 提交于 2020-01-11 07:22:09
问题 04-01 10:17:20.701: E/MapActivity(377): Couldn't get connection factory client All I get is gray tiles and the map doesn't get loaded. Hey everyone I know there are lots of similar posts I did thoroughly go through them. It can be Internet permission (I added that before application tag ), Or uses-library android:name="com.google.android.maps" (Added inside application tag ) or it's bad API Key. Here's the thing I earlier created a debug key and Google map api v1 displayed map correctly with

How do I select a marker using the Maps V2 Android API?

╄→尐↘猪︶ㄣ 提交于 2020-01-11 03:04:16
问题 I am currently using the ItemizedOverlay class from the Maps V1 API, which keeps track of what marker (if any) is currently selected. Is there any similar functionality in Maps V2 to determine which marker is currently selected? Also, is there a way to programatically select a new marker? 回答1: Yes. To determine which marker is selected, add a OnInfoWindowClickedListener to your GoogleMap: //mMap is an instance of GoogleMap mMap.setOnInfoWindowClickListener(getInfoWindowClickListener());

Google Map returning nullpointerexception Google Maps Android V2

孤街浪徒 提交于 2020-01-09 08:01:08
问题 I have a google map in a fragment in my application. Funny thing is that the map loads, but the logcat displays a NullPointerException , and I only noticed it when tried to update the camera on the map so that it could automatically zoom in on the marker . Only then the map will crash. Otherwise, the map loads fine in the fragment but with no marker (even though I am adding one using my current gps location ). EDITED* I understand that its crashing because the googleMap is null, but I don't