google-maps-android-api-2

How to get Latitude/Longitude span in Google Map V2 for Android

这一生的挚爱 提交于 2019-12-17 18:19:00
问题 I have a task for move my app to Google Maps Android APIs V2. Now, I need to get Latitude/Longitude span. I used MapView.getLatitudeSpan() and MapView.getLongitudeSpan() in previous version APIs. Now I can't find something like this in V2. Does anybody have the same problem? 回答1: You can use the following code to get the lat/lng span: VisibleRegion vr = mMap.getProjection().getVisibleRegion(); double left = vr.latLngBounds.southwest.longitude; double top = vr.latLngBounds.northeast.latitude;

Android Google Maps API Location

拜拜、爱过 提交于 2019-12-17 16:53:44
问题 I've googled around a bit, and still can't find a definite answer to this. What is the current "best" or "recommended" way of using Google Maps in Android? I want my application to use the blue dot that automatically keeps track of the user's location, much like the Maps app does when you click on the "my location" button. Some of this functionality seems to come built in just by using the map, however, I'm unsure how to extract the Location from this, as I've read .getMyLocation() is

Blank GoogleMap on a real Android 2.3 device with Google API (Lv. 17)

。_饼干妹妹 提交于 2019-12-17 16:37:19
问题 Question Description, Please read this first I am trying to get my simple app which will display user's location running on devices from Android 2.3 to Android 4.0+ devices. The map does not show up on a real Android 2.3 device. The app currently can run and show maps as I desired on Android 4.0+ device without any problem. Because it can display maps without any problem on Android 4.0+, so I presume the problem should not be anything wrong with the settings or permissions of Google Maps V2.

Using the android Google Maps API v2 as a viewer of offline tiles: is it possible?

ε祈祈猫儿з 提交于 2019-12-17 15:51:14
问题 The Google map component (com.google.android.gms.maps.GoogleMap) allows one to render custom tiles (OpenStreetMap or other). These tiles can be on the device and available offline which is what I am doing by extending TileProvider. Doing this in conjunction with a: mMap.setMapType(GoogleMap.MAP_TYPE_NONE); I am not pulling any data from Google map servers and the component can reasonably be expected to work without an internet connection. (I emphasize here that I am not trying to cache Google

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

天涯浪子 提交于 2019-12-17 15:34:16
问题 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

Should I use MapView or MapFragment

你。 提交于 2019-12-17 15:29:29
问题 I am not sure whether I should be using MapView or stick to using a MapFragment . My application is an app that finds the nearest set of places that are closest to you. I want to be able to add locations, display details of a marker when I press a marker and when the user moves along the map I want to be able to get the coordinates of the center of the map and display the nearest locations within a defined radius. Would I be at a disadvantage if I continue to use MapFragments or should I

android : java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable

梦想的初衷 提交于 2019-12-17 14:53:30
问题 My activity code package com.example.testmap; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.view.Menu; import com.google.android.gms.maps.SupportMapFragment; public class MainActivity extends FragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main, menu)

How to run Google Map API V2 on Android emulator

放肆的年华 提交于 2019-12-17 14:47:51
问题 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? 回答1: 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

Google Maps V2 - Error inflating class Fragment

淺唱寂寞╮ 提交于 2019-12-17 10:47:09
问题 I'm trying my hand and Android Application Development. I'm currently using Eclipse (I can't remember the version, whatever the newest is). I've crossed a bridge where I just can't seem to grasp what I'm doing wrong. I'm attempting to use the Google Maps V2 API. I've been through several documents and tried several techniques, all of which lead to the same error: Android.view.Inflate Exception: Binary XML file line #2: Error inflating class fragment I've been pounding my face into the keys

Google Maps Android API V2 check if GoogleMaps are installed on device

谁都会走 提交于 2019-12-17 10:25:34
问题 When using Google Maps Android API V2 I'm following the Google Play Services setup documentation to make a check to ensure that Google Play Services are installed, using the following code in my main Activity: @Override public void onResume() { checkGooglePlayServicesAvailability(); super.onResume(); } public void checkGooglePlayServicesAvailability() { int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); if(resultCode != ConnectionResult.SUCCESS) { Dialog dialog =