google-maps-android-api-2

Google Maps Android API v2 Authorization failure

ⅰ亾dé卋堺 提交于 2019-11-26 01:45:12
问题 My steps: got SHA1 code from debug.keystore create app in google apis console enabled google map api v2 input SHA1;my.package.name get API key created AndroidManifest file: <permission android:name=\"my.package.name.permission.MAPS_RECEIVE\" android:protectionLevel=\"signature\"/> <uses-permission android:name=\"my.package.name.permission.MAPS_RECEIVE\"/> <uses-sdk android:minSdkVersion=\"8\" android:targetSdkVersion=\"15\"/> <uses-permission android:name=\"android.permission.INTERNET\"/>

How to download Google Play Services in an Android emulator?

天大地大妈咪最大 提交于 2019-11-26 01:28:26
问题 I want to use Google Play Services API in my application, but when I open the emulator to test my application it sends me a message that says \"Google Play Services must be downloaded\". I know that occurs because I coded this test in my MainActivity in the method onResume() . I want to know how I can install Google Play Services in my emulator, because soon I will need to test my maps. 回答1: Check out Setting Up Google Play Services which says: To develop an app using the Google Play services

Draw path between two points using Google Maps Android API v2

二次信任 提交于 2019-11-26 01:27:00
问题 Google changed its map API for Android and introduced API V2. The previous codes for drawing path are not working with API V2. I have managed to draw a path with API V2. I had searched a lot for the solution but did not find any answer. So I am sharing its answer. 回答1: First of all we will get source and destination points between which we have to draw route. Then we will pass these attribute to below function. public String makeURL (double sourcelat, double sourcelog, double destlat, double

How to draw interactive Polyline on route google maps v2 android

会有一股神秘感。 提交于 2019-11-26 00:58:02
问题 i have the following code which is drawing polylines for me and working fine, But the problem is that its not drawing interactive polylines, drawn lines are missing some pixels ! import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client

This app won&#39;t run unless you update Google Play Services (via Bazaar)

冷暖自知 提交于 2019-11-25 23:59:17
问题 I\'m testing out the new Google Maps API V2 for Android, and I\'m getting this message when the app launches: This is running on an 4.1 emulator. Here is my AndroidManifest.xml file: <manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" package=\"com.example.maptest\" android:versionCode=\"1\" android:versionName=\"1.0\" > <uses-sdk android:minSdkVersion=\"8\" android:targetSdkVersion=\"15\" /> <permission android:name=\"com.example.maptest.permission.MAPS_RECEIVE\" android

How to create a custom-shaped bitmap marker with Android map API v2 [duplicate]

自闭症网瘾萝莉.ら 提交于 2019-11-25 23:09:13
问题 This question already has an answer here: How can I create a speech-bubble border for a Google Marker Custom Icon using Picasso? 2 answers I am developing an Android Application where I\'m using Google Map API v2. I need to show the user location on a map with custom markers. Each marker will show the picture of the user from an URL. The image must be downloaded in asynchronous mode from the server. See the attached screenshot for an example. How do I add an image and custom information in

How can I show current location on a Google Map on Android Marshmallow?

我是研究僧i 提交于 2019-11-25 22:57:04
问题 I want google maps to show the location of the user. I tried this code, but it did not work on Android 6. private GoogleMap map; LocationManager lm; LocationListener ll; Location l; LatLng pos; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.start_layout); lm = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); ll = new LocationListener() { @Override public void onLocationChanged(Location location) { l

Google Maps Android API v2 - Interactive InfoWindow (like in original android google maps)

和自甴很熟 提交于 2019-11-25 22:26:13
问题 I am trying to a make custom InfoWindow after a click on a marker with the new Google Maps API v2. I want it to look like in the original maps application by Google. Like this: When I have ImageButton inside, its not working - the entire InfoWindow is slected and not just the ImageButton . I read that it is because there isn\'t a View itself but it\'s snapshot, so individual items cannot be distinguished from each other. EDIT: In the documentation (thanks to Disco S2): As mentioned in the

Capture screen shot of GoogleMap Android API V2

偶尔善良 提交于 2019-11-25 21:12:59
Final Update The feature request has been fulfilled by Google. Please see this answer below. Original Question Using the old version of the Google Maps Android API, I was able to capture a screenshot of the google map to share via social media. I used the following code to capture the screenshot and save the image to a file and it worked great: public String captureScreen() { String storageState = Environment.getExternalStorageState(); Log.d("StorageState", "Storage state is: " + storageState); // image naming and path to include sd card appending name you choose for file String mPath = this

How to draw interactive Polyline on route google maps v2 android

依然范特西╮ 提交于 2019-11-25 20:42:27
i have the following code which is drawing polylines for me and working fine, But the problem is that its not drawing interactive polylines, drawn lines are missing some pixels ! import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.List; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl