העדפת עצירת ביניים
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
במקומות מסוימים, הנהגים לא יכולים לעצור בבטחה (לדוגמה, באזורים מוגבהים, במעבורות, במיקומים תת-קרקעיים ובאזורים אחרים עם גישה מוגבלת). התכונה עצירה מעבירה את נקודת הדרך למקום סמוך אם המיקום שלה לא מתאים לעצירה של רכב. כשמגדירים את vehicleStopover ל-YES, נקודת הביניים ממוקמת מחדש באופן אוטומטי כשמחשבים את המסלול, אם יש מיקום חלופי.
איך זה עובד
כשיוצרים את נקודת הציון של העצירה, מגדירים את ההעדפה לעצירה.
כדי לעשות את זה, מגדירים את ההעדפה לחניית ביניים ב-GMSNavigationMutableWaypoint כמו בדוגמה הבאה:
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){...}];
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 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"]]