스톱오버 환경설정

특정 장소에서는 운전자가 안전하게 정차할 수 없습니다 (예: 고가 도로, 페리, 지하 장소, 접근이 제한된 기타 지역). 경유지 기능은 차량이 정차하기에 적합하지 않은 위치에 경유지가 있는 경우 근처 장소로 경유지를 재배치합니다. vehicleStopoverYES로 설정하면 대체 위치가 있는 경우 경로가 계산될 때 경유지가 자동으로 재배치됩니다.

작동 방식

정차 지점의 경유지를 만들 때 해당 정차 지점의 환경설정을 설정합니다. 이렇게 하려면 다음 예와 같이 GMSNavigationMutableWaypoint에서 경유지 환경설정을 설정합니다.

Swift

CLLocationCoordinate2D location = CLLocationCoordinate2D(47.67, -122.20);
GMSNavigationMutableWaypoint *waypoint =
    GMSNavigationMutableWaypoint(withLocation: location,
                                        title: @"waypoint from location");
waypoint.vehicleStopover = YES;
mapView.navigator?.setDestinations([waypoint], routingOptions: routingOptions, callback: {...})

Objective-C

CLLocationCoordinate2D location = CLLocationCoordinate2DMake(47.67, -122.20);
GMSNavigationMutableWaypoint *waypoint =
    [[GMSNavigationMutableWaypoint alloc] initWithLocation:location
                                                     title:@"waypoint from location"];
waypoint.vehicleStopover = YES;
[_mapView.navigator setDestinations:@[waypoint1]
                     routingOptions:routingOptions
                           callback:^(GMSRouteStatus routeStatus){...}];