Preferensi Persinggahan
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Di tempat tertentu, pengemudi tidak dapat berhenti dengan aman (misalnya,
area tinggi, feri, lokasi bawah tanah, dan area lain dengan akses terbatas). Fitur Persinggahan memindahkan titik jalan ke tempat terdekat jika
lokasinya tidak sesuai untuk kendaraan berhenti. Saat Anda menyetel
vehicleStopover ke YES, titik jalan akan otomatis dipindahkan saat
rute dihitung, jika lokasi alternatif tersedia.
Cara kerjanya
Anda dapat menetapkan preferensi untuk persinggahan saat membuat titik jalan untuk perhentian tersebut.
Untuk melakukannya, tetapkan preferensi untuk persinggahan di
GMSNavigationMutableWaypoint seperti yang ditunjukkan dalam contoh berikut:
Swift
CLLocationCoordinate2Dlocation=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
CLLocationCoordinate2Dlocation=CLLocationCoordinate2DMake(47.67,-122.20);GMSNavigationMutableWaypoint*waypoint=[[GMSNavigationMutableWaypointalloc]initWithLocation:locationtitle:@"waypoint from location"];waypoint.vehicleStopover=YES;[_mapView.navigatorsetDestinations:@[waypoint1]routingOptions:routingOptionscallback:^(GMSRouteStatusrouteStatus){...}];
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-12-19 UTC."],[],["The **Stopover** feature automatically relocates waypoints unsuitable for vehicle stops, such as elevated areas or ferries. To enable this, set `vehicleStopover` to `YES` on a `GMSNavigationMutableWaypoint` when creating the waypoint. This triggers automatic relocation during route calculation if an alternative location is available. The provided examples in Swift and Objective-C demonstrate how to configure `vehicleStopover` on a waypoint.\n"]]