akexorcist / GoogleDirectionLibrary

[Android] Library for Google Direction API for Google Maps Android API v2
Apache License 2.0
571 stars 174 forks source link

After add waypoint with .and, it stop draw polyline after 1st waypoint in route #77

Closed saadbzu closed 3 years ago

akexorcist commented 3 years ago

Could you please provide the latitude/longitude for the direction that I can reproduce your problem?

mishragashish commented 3 years ago

Facing same issue. Its not drawing polyline after first way point.

mishragashish commented 3 years ago

From lat/lng: (26.5507785,80.481009) Ways Point lat/lng: (26.552678,80.479401),lat/lng: (26.536169,80.483978) To lat/lng: (26.544338,80.4904724)

akexorcist commented 3 years ago

@mishragashish I tested on sample project with your location. It's work fine

val start = LatLng(26.5507785, 80.481009)
val waypoint1 = LatLng(26.552678,80.479401)
val waypoint2 = LatLng(26.536169,80.483978)
val to = LatLng(26.544338,80.4904724)
GoogleDirection.withServerKey(serverKey)
    .from(start)
    .and(waypoint1)
    .and(waypoint2)
    .to(to)
    .transportMode(TransportMode.DRIVING)
    .execute(
        onDirectionSuccess = { direction -> onDirectionSuccess(direction) },
        onDirectionFailure = { t -> onDirectionFailure(t) }
    )

image

Please tell me more if there's incorrect in my test.

akexorcist commented 3 years ago

I close this issue because there's no response for a while. Feel free to reopen it if you still have an issue about this.