google-maps-android-api-2

ActionBarSherlock + Google Maps API v2 Duplicate Id

别来无恙 提交于 2019-12-30 18:05:29
问题 I'm trying to integrate the ActionBarSherlock with Google Maps API v2 fragments. I have a layout with 2 fragments: one for a list layout and another with a SupportMapFragment. When I click on a list item first go well but when I click on a list item second time, it throws an error: " Duplicate id 0x7f040038, tag null, or parent id 0x0 with another fragment for com.google.android.gms.maps.SupportMapFragment" I tried several solutions and none of them have been able to fix it. Is there

Google map view no longer loading after ADT upgrade; apparent authentication issue?

混江龙づ霸主 提交于 2019-12-30 11:17:07
问题 I'm working on an location-aware Android app that uses Google Maps. I upgraded by ADT to 23.0.0.1245622 the other day. I think I was on v22.6.2-1085508 before then. Now the map view only contains the Google logo and the +/- buttons. And, eerily, my logcat contains the following line: 07-01 12:15:08.548: E/Google Maps Android API(6299): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors). I have tried cleaning the

couldn't run Google Maps Android API Utility Demo

喜夏-厌秋 提交于 2019-12-30 11:01:07
问题 i'm having problems to run the Google Maps Android API Utility Demo, it shows this error: 04-03 16:32:37.397: E/dalvikvm(2592): Could not find class 'com.google.maps.android.utils.demo.ClusteringDemoActivity', referenced from method com.google.maps.android.utils.demo.MainActivity.onCreate 04-03 16:32:37.452: E/AndroidRuntime(2592): FATAL EXCEPTION: main 04-03 16:32:37.452: E/AndroidRuntime(2592): java.lang.NoClassDefFoundError: com.google.maps.android.utils.demo.ClusteringDemoActivity 04-03

Google Maps - “App won't run unless you update Google Play services”

心不动则不痛 提交于 2019-12-30 09:58:16
问题 I'm just trying to run the simple Google Maps tutorial here: https://developers.google.com/maps/documentation/android/start I'm running my app on my Nexus 4, and I receive the "update Google Play services" message with an Update button. When I click the Update button, it takes me to the Google Play services app on the Play Store, but it appears that it's updated to the latest version. Is there anything else I might be missing? Android Manifest file: <?xml version="1.0" encoding="utf-8"?>

Google Maps Android API v2: My location marker always over other markers?

半腔热情 提交于 2019-12-30 02:29:09
问题 Currently migrating an Android app using Google Maps to Google Maps Android v2; I want the map to display the built-in location marker, as well as custom markers. With the previous library, I used to draw the location marker 'below' custom markers, with mapView.setReticleDrawMode(ReticleDrawMode.DRAW_RETICLE_UNDER); I can't find a similar option in the new API. Did I miss something? 回答1: After a bit a searching, I couldn't find such an option. I finally removed the location pin, and added a

Android: how to notify Activity when Fragments views are ready?

不问归期 提交于 2019-12-30 00:19:13
问题 I'm using Google Maps API V2 in an activity wih drop down navigation where the map is on the second position. I'm adding the map pragmatically like: mMapFragment = supportMapFragment.newInstance(); getSupportFragmentManager() .beginTransaction() .replace(R.id.placeHolder, mMapFragment, TAG_MAP) .commit(); I want to get the GoogleMap ovject, as the documentation https://developers.google.com/maps/documentation/android/map say it should be done with mMapFragment.getMap() , but it returns null.

Creating OnDragListener for Google Map v2 Fragment

梦想与她 提交于 2019-12-29 20:58:09
问题 I’m trying to setup an onDrag Listener for a google map fragment, but can’t get the drag event to fire. Since the map doesn't support drag events directly, I'm trying to implement a drag listener for the View. I know about the onMarkerDrag event, but that does me no good since I'm not trying to move markers around. The reason for trapping map drag events is twofold: First to detect if the user has panned the map. If they haven't, I like to keep their location on the screen, and animate to

Google map not showing in android activity?

纵饮孤独 提交于 2019-12-29 08:15:19
问题 In my android app I want to have a MainActivity with a google map occupying the entire screen. My problem is that the google map does not display a map, only the google logo in the bottom left corner: Here are the relevant parts of the main activity where the map should be displayed: public class MainActivity extends AppCompatActivity implements OnMapReadyCallback, NavigationView.OnNavigationItemSelectedListener { private GoogleMap mMap; private FragmentManager mFragmentManager; @Override

Map Marker icon animation (Google Maps API V2 for Android)

天涯浪子 提交于 2019-12-29 07:19:36
问题 On a custom event, I need my Marker to update its drawable 6 times (basically, I want the Marker to grow and shrink 3 times with a delay of 0.5 s between each growth and each shrink) so it notifies the user of said event. Is there any way to achieve this without actually having to remove the Marker and adding it again with a different Drawable ? 回答1: I'm afraid there is no way to do it today without actually removing the marker and adding it again with another drawable. I have just done so

AutoComplete Search bar in Google Maps

我们两清 提交于 2019-12-29 07:00:46
问题 I'm creating an app based on places search. I would like to know how can I add a search bar into my Google Map, where the user can select a Place, and I can capture what the user chose. I'm trying to include an autocomplete Search Box that is displayed above the Google Map in the UI. 回答1: You can simply use a PlaceAutoCompleteFragment. First ensure that you're using the latest version of Google Play Services (Version 8.4.0 and up includes the PlaceAutoCompleteFragment class): compile 'com