google-maps-android-api-2

Map view following user - MyLocationOverlay type functionality for Android Maps API v2

血红的双手。 提交于 2019-11-27 17:38:27
I switched to v2 of Maps for Android, and I am trying to port over the following functionality: With MyLocationOverlay I can show the devices current location (Blue Dot). When the user's location changes and the dot reaches the edge of the visible area, the map animates out so the dot becomes the center of the view, in real time. In v2, I am using SupportMapFragment with getMap().setMyLocationEnabled(true). The current location appears as a blue dot(arrow), but when the device changes location, the map view does not shift and the dot eventually leaves the view. Any ideas? UPDATE : Google

Google Maps Android API v2 very slow when adding lots of Markers

喜你入骨 提交于 2019-11-27 17:27:31
I am updating an existing Android app to use the new Google Maps Android API v2. I have about 2500 markers that I want to add to the map. With the older version of the API I found the responsiveness of the maps to be horrendous when there are 2500 markers, so I had to work around it by only adding markers that are in the current visible region of the map. I was hoping 2500 markers would be faster with the new API, but it's still awful, even on a Nexus 4, and I'm not seeing any sort of option to do clustering. So my question: how can I determine if a certain lat/lng point is contained within

Android app is crashing due to V/GoogleSignatureVerifier: Signature not valid

泪湿孤枕 提交于 2019-11-27 17:23:43
I have an android app in which I am using Google Maps API for Android v2. It was working fine in my phone until I upgraded my phone to Marshmallow. After updating my phone once I uninstalled it and again installed it using Android Studio it started having random crash. And every time the error was V/GoogleSignatureVerifier: Signature not valid. Found: MIIDDTCCAfWgAwIBAgIEPmxzXDANBgkqhkiG9w0BAQsFADA3MQswCQYDVQQGEwJVUzEQMA4GA1UE ChMHQW5kcm9pZDEWMBQGA1UEAxMNQW5kcm9pZCBEZWJ1ZzAeFw0xNTA5MjExMjE1MDNaFw00NTA5 MTMxMjE1MDNaMDcxCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdBbmRyb2lkMRYwFAYDVQQDEw1BbmRy

Move all the markers on the map to their updated/new current location periodically as users moves

∥☆過路亽.° 提交于 2019-11-27 16:27:10
I'm developing an android app where some users opens the same activity from their devices. There is a map in this activity and as users opens this activity from their devices, their location coordinates is fetched from Firebase and a marker based on these coordinates is shown on the map. Here's my code: acceptingUserReference.child(requestID).child(key).addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { if (dataSnapshot.getValue() != null) { final Map<String, String> newAcceptedUser = (Map<String, String>) dataSnapshot

How to run Google Map API V2 on Android emulator

本秂侑毒 提交于 2019-11-27 16:09:47
I've tried to implement Google Maps v2 in my Android Application, but unfortunately instead of Maps I can see this message: This app won't run without Google Play Services, which are missing from your phone along with button "Get Google Play Services". Before tell me, is this possible to run Google Maps on Android emulator? You should use an emulator based on SDK version 4.2.2 or higher. Look here for details: http://developer.android.com/google/play-services/setup.html Note: Only Android 4.2.2 and higher versions of the Google APIs platform include Google Play services. Rishabh Srivastava Try

BadParcelableException in google maps code

好久不见. 提交于 2019-11-27 15:56:50
问题 Running slightly modified example of Google Maps throws BadParcelableException in the Google Maps code. The LatLng class is parcelable but it cannot be found. It seems that Google Maps code is trying to unparcel the object that was not parcelled by it. What cases the problem? package com.example.mapdemo; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapView; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model

Android Google Maps V2 authentication error

江枫思渺然 提交于 2019-11-27 15:55:40
I get this message in logCat when I attempt to load a supportMapFragment: Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors). I believe my key is valid because it works on one phone (galaxy s), but does not work for an older phone (optimus v) and newer phone (galaxy s3). I have all necessary permissions in the manifest and my network connection is just fine, so not sure why it would work on one phone by not another. Any ideas? tony m If all your permission settings and API key in manifest are correct, then if you

SupportMapFragment does not support AndroidX Fragment

倖福魔咒の 提交于 2019-11-27 15:00:34
import com.google.android.gms.maps.SupportMapFragment; import androidx.fragment.Fragment; ... private SupportMapFragment mMapFragment; ... mMapFragment = (SupportMapFragment) form.getSupportFragmentManager().findFragmentByTag(MAP_FRAGMENT_TAG); Here, the IDE shows an error that androidx.fragment.Fragment cannot cast to SupportMapFragment (which extends android.support.v4.app.Fragment) I'm using the version 15.0.1 of the play-services-maps and version 1.0.0-beta01 of the AndroidX libraries. I have not found any updates to SupportMapFragment after AndroidX in the release notes: https:/

Failed to load map. Error contacting Google servers issue with android google maps api v2 [duplicate]

假装没事ソ 提交于 2019-11-27 14:36:28
This question already has an answer here: Failed to load map. Error contacting Google servers. This is probably an authentication issue 25 answers I have been trying to app a Google Map in my Android app using the v2 API for the past two days, with no success. All I get every time is a Google Maps Android API(16603): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors). I have followed Google's setup tutorial ( https://developers.google.com/maps/documentation/android/start ), tried multiple times with different

How to smoothly keep moving current location marker in Google Maps v2 android

穿精又带淫゛_ 提交于 2019-11-27 14:05:18
问题 I have placed a marker for my location. I would like to move my marker smoothly something like the Google maps app. The blue circle moves very smoothly when I keep moving in my car. I would like implement the same for my app. how do I implement this on my app? As of now my location marker just jumps for different location on very location change and marks the marker there. Here is what I have don: googleMap.setMyLocationEnabled(true); So onMyLocationChange method is called automatically: