Uncaught exception thrown by finalizer

后端 未结 2 1100
天涯浪人
天涯浪人 2021-01-23 12:56

Hi i am geting this error. i am using this code http://www.androidhive.info/2012/08/android-working-with-google-places-and-maps-tutorial/

when i on click of Show place

相关标签:
2条回答
  • 2021-01-23 13:33

    This is the code for getting Google directions between two locations. May this help you.

    double srcLatitude = 0;
    double srcLongitude = 0;
    Location location = GeoLocationUtil.getGeoLocation(this);
    if (GeoLocationUtil.isValidLocation(location)) {
        srcLatitude = location.getLatitude();
        srcLongitude = location.getLongitude();
    }
    
    final Intent intent = new Intent(Intent.ACTION_VIEW,
    /** Using the web based turn by turn directions url. */
    Uri.parse("http://maps.google.com/maps?" + "saddr=" + srcLatitude + ","
        + srcLongitude + "&daddr=" + destLat + "," + destLong));
    
    intent.setClassName("com.google.android.apps.maps",
        "com.google.android.maps.MapsActivity");
    startActivity(intent);
    
    0 讨论(0)
  • 2021-01-23 13:57

    as i wrote in this answer: https://stackoverflow.com/a/13161591/1716620

    i think that the problem is caused by uncorrect zoom level while performing drawing, try to check your zoom level before performing drawings, i solved that way

    0 讨论(0)
提交回复
热议问题