google-maps-android-api-2

java.lang.NullPointerException for google map API v2

耗尽温柔 提交于 2019-12-11 13:56:41
问题 I have been trying to solve this issue for ages and I can't find where the problem is. I am having trouble only with some devices that run Android 2.2. I tested on Android 4.1.2 and it works fine. The error I am getting: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.coldice.plotfinder/com.coldice.plotfinder.MapFragment}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2668) at android.app.ActivityThread

Drawing a real time route in android, google maps v2

你离开我真会死。 提交于 2019-12-11 13:06:56
问题 I'm looking for a better way at drawing a route on google map v2 on android in real time. I'm developing android route tracking application, so basically i have a service which continuasly tracks my location in background and sends a location update via broadcast to my activity with map fragment. In activity i have implemented local broadcast receiver which receives location updates from service. My code works at drawing a route but it is not the smartest way to do because i have to

Add static square grids using google map api in android

懵懂的女人 提交于 2019-12-11 12:46:28
问题 In my project, I need to define areas in google map. So, I thought of dividing google map in static square grids in android using google-maps-API. I am new to google-maps-API so any help would be great. 回答1: The similar question was asked before and @MaciejGórski provided a nice solution: https://stackoverflow.com/a/16359857/5140781 There are several notes I can add because the aforementioned answer is quite old and links are not valid anymore. They refer to the project in Google code that

Android Google Maps application showing grey background instead of the map

故事扮演 提交于 2019-12-11 12:37:31
问题 OK, I'm having the weirdest bug right now : the Android application I'm working on is displaying a grey background instead of the map, such as below : (source: hostingpics.net) Here's the logcat : 04-25 15:08:42.082: E/Google Maps Android API(19139): Failed to load map. Could not contact Google servers. 04-25 15:08:42.082: W/Google Maps Android API(19139): Please add <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> into AndroidManifest.xml to ensure correct behavior

Google Maps Android Authorization Failure

偶尔善良 提交于 2019-12-11 12:12:41
问题 So I've looked over many questions on this issue but have failed to find a solution. Following is the error I'm currently receiving when I try to use the Google Maps Android API. 02-28 11:17:07.166 7445-7653/com.test.drawernav E/b: Authentication failed on the server. 02-28 11:17:07.166 7445-7653/com.test.drawernav E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map. 02-28 11:17:07.176

still error Android: Unable to start activity ComponentInfo{/com.}: android.view.InflateException: Binary XML file line Error inflating class fragment

可紊 提交于 2019-12-11 11:59:48
问题 I created first version of my application using Google Maps Android v1 API. But now When I released my application for second version, Google map stopped working. I think it's because of it's deprecated. So now I'm trying to create sample Android application to use Google Map using this link. First I was trying with this code But as I suggested to use SupportMapFragment with FragmentActivity, I changed my xml code to <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

The meta-data tag in your app's AndroidManifest.xml does not have the right value. - Google Maps

放肆的年华 提交于 2019-12-11 11:49:38
问题 I'm trying to implement google-play-services library and it seems to me I'm doing everything right. Here's my stacktrace: 06-14 13:17:51.804: E/AndroidRuntime(22809): java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 8298000 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"

Google maps reverse geocoding via HTTPS in Android

风格不统一 提交于 2019-12-11 11:33:08
问题 I am making google map app. Since Geocoder class returns empty(out of bounds at [0]) i am currently trying the HTTPS Google maps reverse GeoCoding. This is my onClick call: public JSONArray getAddress(LatLng latLng) throws IOException { URL url = new URL("https://maps.googleapis.com/maps/api/geocode/json?latlng="+latLng.latitude+","+latLng.longitude+"&key=AIza***********************"); Async async =new Async(); async.execute(url); JSONArray response = async.jsonArray; return response; } This

How to display text when tap on marker in google maps android

给你一囗甜甜゛ 提交于 2019-12-11 11:22:25
问题 I want to display like this. https://lh6.ggpht.com/DOvS0NiHGyGC9Vn7JvkwznRBZ7I65j3zwpNAqLkP5y083ju7JQbwWi4NAXQLp5Wsavmn=h900 When google map marker gets tap, text will display below. It can be drag up and down. I don't get how it has been done. public class MapsActivity extends FragmentActivity { Googlemap gm; gm = ((SupportMapFragment) (getSupportFragmentManager() .findFragmentById(R.id.map))).getMap(); gm.setMapType(GoogleMap.MAP_TYPE_NORMAL); gm.setOnInfoWindowClickListener(this);

How do I implement an InfoWindowAdapter interface in Xamarin?

强颜欢笑 提交于 2019-12-11 10:56:53
问题 I am using Xamarin and I am wanting to create a CustomWindowAdapter that implements a GoogleMap.InfoWindowAdapter interface. I have tried this so far: public class CustomWindowAdapter : InfoWindowAdapter { } I am getting this error: Error CS0246: The type or namespace name 'InfoWindowAdapter' could not be found (are you missing a using directive or an assembly reference?) Here is the documentation for the interface: https://developers.google.com/maps/documentation/android/reference/com/google