String url = String.format("%s%s&interpolate=true&key=%s", GOOGLE_ROADS_SNAP_URL, pathEncoded, roadsKey);ClientResponse response = client.resource(URI.create(url)) .accept(MediaType.APPLICATION_JSON_TYPE) .get(ClientResponse.class);if (!isSuccess(response)) { return handleFailure(response);}SnappedRoute snappedRoute = response.getEntity(SnappedRoute.class);if (snappedRoute.getSnappedPoints() == null) { return Optional.absent(); }List snapped = convert(snappedRoute.getSnappedPoints());
GoogleDirectionsDefinition *defn = [[GoogleDirectionsDefinition alloc] init];defn.startingPoint = [GoogleDirectionsWaypoint waypointWithQuery:@"221B Baker Street, London"];defn.destinationPoint = [GoogleDirectionsWaypoint waypointWithLocation:CLLocationCoordinate2DMake(51.498511, -0.133091)];defn.travelMode = kGoogleMapsTravelModeBiking;[[OpenInGoogleMapsController sharedInstance] openDirections:defn];
Give us feedback in our Product Forums.