google-maps-android-api-2

AndroidRuntime: FATAL EXCEPTION: androidmapsapi-ZoomTableManager

☆樱花仙子☆ 提交于 2020-05-02 14:20:51
问题 My app that uses Google Maps SDK (v2) just started crashing with this exception: Process: com.currentlocation.android, PID: 7328 java.lang.ArrayIndexOutOfBoundsException: length=1; index=12 at com.google.maps.api.android.lib6.gmm6.vector.ct.<init>(:com.google.android.gms.dynamite_mapsdynamite@201216081@20.12.16 (120400-0):9) at com.google.maps.api.android.lib6.gmm6.vector.cv.a(:com.google.android.gms.dynamite_mapsdynamite@201216081@20.12.16 (120400-0):23) at com.google.maps.api.android.lib6

Directions API total distance & duration with waypoints

白昼怎懂夜的黑 提交于 2020-04-11 07:40:22
问题 I am getting directions including waypoints from Directions API in my Android app. It contains multiple "leg" segments which has its own distance and duration. Is there a way to sum all distances and durations get the total values? Example: Stripped json segment from Direction API legs": [ { "distance": { "text": "389 km", "value": 389438 }, "duration": { "text": "6 hours 31 mins", "value": 23452 } }, { "distance": { "text": "0.5 km", "value": 487 }, "duration": { "text": "2 mins", "value":

Directions API total distance & duration with waypoints

生来就可爱ヽ(ⅴ<●) 提交于 2020-04-11 07:40:10
问题 I am getting directions including waypoints from Directions API in my Android app. It contains multiple "leg" segments which has its own distance and duration. Is there a way to sum all distances and durations get the total values? Example: Stripped json segment from Direction API legs": [ { "distance": { "text": "389 km", "value": 389438 }, "duration": { "text": "6 hours 31 mins", "value": 23452 } }, { "distance": { "text": "0.5 km", "value": 487 }, "duration": { "text": "2 mins", "value":

“IBitmapDescriptorFactory is not initialized” error

流过昼夜 提交于 2020-04-07 12:35:51
问题 I'm trying to get a marker with an custom icon in Google Maps Android API v2. I just changed one of the examples Google provides. I added .icon(BitmapDescriptorFactory.fromResource(R.drawable.arrow)) to RawMapViewDemoActivity in method setUpMap(). private void setUpMapIfNeeded() { if (mMap == null) { mMap = ((MapView) findViewById(R.id.map)).getMap(); if (mMap != null) { setUpMap(); } } } private void setUpMap() { mMap.addMarker(new MarkerOptions() .position(new LatLng(0, 0)) .title("Marker")

Google Maps Geocoding API usage limit

半腔热情 提交于 2020-03-21 19:36:25
问题 I'm currently using Google's Maps Geocoding API and, as the documentation informs, it has a limit per day usage of 2500 requests. Is there some service that I can call to check how many requests I already did, or I still can do? I know that in the Google's API Console has this information, but I was considering doing something programmatically with my application, where it can by itself know the current status and inform me if the request is close to ending. FYI: I am aware that if the

Google Maps Geocoding API usage limit

妖精的绣舞 提交于 2020-03-21 19:33:29
问题 I'm currently using Google's Maps Geocoding API and, as the documentation informs, it has a limit per day usage of 2500 requests. Is there some service that I can call to check how many requests I already did, or I still can do? I know that in the Google's API Console has this information, but I was considering doing something programmatically with my application, where it can by itself know the current status and inform me if the request is close to ending. FYI: I am aware that if the

How to detect long click on GoogleMap marker

痞子三分冷 提交于 2020-03-06 08:35:36
问题 In my app I have a MapFragment. I do map = mapFragment.getMap(); and after that add a marker in the event onMapClick(LatLng point){ ... map.addMarker(new MarkerOptions() .position(point) .title(txt)); ... } All this works perfectly. What I need is to know when the user keep long click on the marker I put on the map. I made some handmade calculations in onMapLongClick(LatLng point){ ... if((Math.abs(mrkrPos.latitude-point.latitude)<0.0005)&&(Math.abs(mrkrPos.longitude-point.longitude)<0.0005))

How to detect long click on GoogleMap marker

*爱你&永不变心* 提交于 2020-03-06 08:35:35
问题 In my app I have a MapFragment. I do map = mapFragment.getMap(); and after that add a marker in the event onMapClick(LatLng point){ ... map.addMarker(new MarkerOptions() .position(point) .title(txt)); ... } All this works perfectly. What I need is to know when the user keep long click on the marker I put on the map. I made some handmade calculations in onMapLongClick(LatLng point){ ... if((Math.abs(mrkrPos.latitude-point.latitude)<0.0005)&&(Math.abs(mrkrPos.longitude-point.longitude)<0.0005))

Google maps V2 if i change my api key in developer console in updated version what will happen to the previous version of my application on playstore

雨燕双飞 提交于 2020-03-06 03:23:11
问题 Google maps V2 if i change my api key in developer console in updated version of my android application. what will happen to the previous version of my application on play store. means the previous key will automatically change or my previous version of application will stop to show maps 回答1: There is no limitation to the number of API keys you can have for Google Maps: if you need one key for an older release, another for a debug key, and another for a new release key, then just create new

Moving and showing the driving camera view on Google maps

瘦欲@ 提交于 2020-02-20 11:20:51
问题 I have added current location via google map routing with Routing routing = new Routing.Builder() .travelMode(Routing.TravelMode.DRIVING) .key(getResources().getString(R.string.google_maps_api)) .withListener(this) .waypoints(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()), site_location) .alternativeRoutes(false) .build(); routing.execute(); @Override public void onRoutingSuccess(ArrayList<Route> route, int shortestRouteIndex) { if (polylines.size() > 0) { for