google-maps-android-api-2

How to get 3D building view in map view in Android?

点点圈 提交于 2019-12-08 04:44:51
问题 I used the map setting, googleMap.setBuildingsEnabled(true); But it's not working. About a month ago, it was working fine. Attaching the screenshot for ref. This is the view I was getting a month ago. Now map shows 2D view. 来源: https://stackoverflow.com/questions/44268824/how-to-get-3d-building-view-in-map-view-in-android

GoogleMap.OnCameraChangeListener onCameraChange works with delays

谁说我不能喝 提交于 2019-12-08 04:18:16
问题 I need to listen CameraPosition changes to draw a custom compass. The problem that: GoogleMap.OnCameraChangeListener onCameraChange this listener may not be notified of intermediate camera positions. it fires with random delays (can not understand why) Is there are any way to listen to CameraPosition bearing changes? (In ios f.e. it's possible to achieve using Key-Value Observing), reflection...? Thanks. 回答1: Put FrameLayout above map and catch touches: @Override public boolean

Google Maps Android API: Authorization failure. Ensure that the “Google Maps Android API v2” is enabled. Ensure that the following Android Key exists

允我心安 提交于 2019-12-08 03:15:25
问题 I am getting this error: E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map. E/Google Maps Android API: In the Google Developer Console (https://console.developers.google.com) Ensure that the "Google Maps Android API v2" is enabled. Ensure that the following Android Key exists: API Key: [The key...] Android Application (<cert_fingerprint>;<package_name>): Instead of the map working

SupportMapFragment with navigationDrawer

北城余情 提交于 2019-12-08 02:56:27
问题 I have an activity that extends ActionBarActivity and has a navigation drawer. This is the xml layout of the activity: <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <FrameLayout android:id="@+id/container" android:layout_width="match_parent" android:layout

NullPointerException when using GMapsV2Direction class

ε祈祈猫儿з 提交于 2019-12-08 01:39:05
问题 I've been trying to fix this run-time error for the last few days to no avail, not sure why it's throwing a NullPointerException when it creates the NodeList when the getDirection method is called. I'm very new to Android programming so if anyone can offer me a little guidance it would be much appreciated, thank you! EDIT: Judging by the debugger the LatLng co-ordinates and the direction type is being passed through the getDocument() method, but a document isn't being returned from the

Using Two SupportMapFragment in one Activity but unable remove Marker from Second SupportMapFragment that i have added in First SupportMapFragment

淺唱寂寞╮ 提交于 2019-12-08 01:36:11
问题 I have strange issue while using Two SupportMapFragment in two different Fragment in one Activity. Actually my problem is let say In OneFragment i have SupprtMapFragment added and i add 10 Marker in that map view and now i go to detail page by adding another Fragment and in that it have also SupprtMapFragment now in this Fragment i want to clear it and want to show Only one pin but it Still Showing 11 Marker over map . Here is my Source code: public class MapActivity extends FragmentActivity

Android googlemaps v2 finish loading event or callback

旧时模样 提交于 2019-12-08 00:27:25
问题 I want to do something after the google maps has loaded(maptiles have been filled) is there anyway to achieve that? 回答1: As noted by qubz, the ViewTreeObserver can be used to achieve a callback after the loading of the map has completed, so the user will get e.g. the correct location right after start-up: @Override public void onCreate(Bundle savedInstanceState) { // This is a small hack to enable a onMapLoadingCompleted-functionality to the user. final View mapView =

Android - Location by LocationManager different from GoogleMaps

风格不统一 提交于 2019-12-08 00:25:46
问题 I have created a location listener by 'LocationManager' with this code: mLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 100, 100, mListenerNetwork); and the listener: LocationListener mListenerNetwork = new LocationListener() { public void onLocationChanged(Location location) { // New Location by LocationManager } public void onProviderDisabled(String provider) { } public void onProviderEnabled(String provider) { } public void onStatusChanged(String provider, int

Multiple InfoWindowAdatper's

主宰稳场 提交于 2019-12-07 17:14:11
问题 I have a map in which I am creating different types of markers. I cannot assign an info window adapter to a marker (gee wouldn't that be nice), I can only assign on InfoWindowAdapter for the entire map (at least I think). My problem is that I want to show a different type of info widow depending on what I clicked. Id the only way to set one InfoWindowAdapter that will handle creating the correct type of info window based on the marker that I am passed? Am I missing something easy? 回答1: When

MapView - Android

爷,独闯天下 提交于 2019-12-07 10:15:58
问题 Hello I'm trying to add MapView to LinearLayout this is my code: GoogleMap mMap = mMapView.getMap(); if (mMap != null) { CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(-33.87365, 151.20689), 10); if (cameraUpdate != null) mMap.moveCamera(cameraUpdate); setUpMap(mMap); } documantation says; Wait for a GoogleMap to become available from a MapFragment or MapView that you have added to your application. You can verify that the GoogleMap is available by calling the getMap