mapbox-directions-swift icon indicating copy to clipboard operation
mapbox-directions-swift copied to clipboard

Navigation on mapmatched routes

Open csongorkeller opened this issue 4 years ago • 21 comments
trafficstars

Hi there, I have an issue with using the mapbox iOS navigation SDK along with mapmatching API. Basically, the problem is after receiving the mapmatched response the navigation SDK doesn't draw all the points on the map. It only picks a few points from the list and therefore the navigation also doesn't contain the whole mapmatched route. Also noticed that both of the methods: Directions.shared.calculate() and Directions.shared.calculateRoutes() do calculate a brand new route even though the points already matched with the route.

Here is the method which accepts 2D coordinates and matches them with mapbox, then calls the navigation SDK for navigation:

func startNavigationWithMapmatching(coordinates: [CLLocationCoordinate2D]) {
     let matchingOptions = NavigationMatchOptions(coordinates: coordinates)
        matchingOptions.includesSteps = true

        var dayStyle = CustomDayStyle()

        let task = Directions.shared.calculateRoutes(matching: matchingOptions) { [self] (session, result) in
            switch result {
            case .failure(let error):
                print("Error matching coordinates: \(error)")
            case .success(let response):
                guard let match = response.routes?.first, let leg = match.legs.first else {
                    return
                }

                print(match)

                let options = NavigationRouteOptions(coordinates: coordinates, profileIdentifier: .cycling)
                        if (_allowsUTurnAtWayPoints != nil)
                        {
                            options.allowsUTurnAtWaypoint = _allowsUTurnAtWayPoints!
                        }
                        options.distanceMeasurementSystem = _voiceUnits == "imperial" ? .imperial : .metric
                        options.locale = Locale(identifier: _language)

                let route = match
                let navigationService = MapboxNavigationService(route: route, routeOptions: options, simulating: .never)

                let navigationOptions = NavigationOptions(styles: [dayStyle], navigationService: navigationService)
                self.startNavigation(route: match, options: options, navOptions: navigationOptions)
            }
        }
 }

Also saw in some documentation that maybe waypoints would do it better, but there is a 25 limit, and in my approach we'd have 400-1000 points to show on the map and navigate through them. Do you have any help how this could be working? Thanks in advance

csongorkeller avatar Mar 05 '21 10:03 csongorkeller

Thank you, @csongorkeller, for the report.

@ShanMa1991 or @jill-cardamon could you run with the initial investigation?

/cc: @andrewbrownnz

zugaldia avatar Mar 08 '21 14:03 zugaldia

I’d check first if the code they provided results in a NavigationMatchOptions and NavigationRouteOptions that has routeShapeResolution set to full (it should).

1ec5 avatar Mar 08 '21 17:03 1ec5

Hi @zugaldia, @1ec5, @jill-cardamon, @ShanMa1991 is there an update on this issue? We're keen to get Mapmatched routes into the SDK so if you could let us know how to proceed. Thanks.

jackgregory avatar Mar 10 '21 17:03 jackgregory

Hi @jackgregory , after looking into this case, we could reproduce this issue. The problem should be related with the response of the Directions.shared.calculateRoutes(matching: matchingOptions). Could you try the following workaround ? It uses the NavigationRouteOptions directly, without the NavigationMatchOptions .

       let options = NavigationRouteOptions(coordinates: coordinates, profileIdentifier:  .cycling)
        options.includesSteps = true
        
        var dayStyle = CustomDayStyle()
        
        let task = Directions.shared.calculate(options) { [self] (session, result) in
            switch result {
            case .failure(let error):
                print("Error matching coordinates: \(error)")
            case .success(let response):
                guard let match = response.routes?.first, let leg = match.legs.first else {
                    return
                }
                print(match)

                if (_allowsUTurnAtWayPoints != nil) {
                    options.allowsUTurnAtWaypoint = _allowsUTurnAtWayPoints!
                }
                options.distanceMeasurementSystem = _voiceUnits == "imperial" ? .imperial : .metric
                options.locale = Locale(identifier: _language)
                
                let route = match
                let navigationService = MapboxNavigationService(route: route, routeIndex: 0, routeOptions: options, simulating: .never)
                let navigationOptions = NavigationOptions(styles: [dayStyle], navigationService: navigationService)
                
                self.startNavigation(route: match, options: options, navOptions: navigationOptions)
            }
        }
    }

ShanMa1991 avatar Mar 10 '21 20:03 ShanMa1991

thanks @ShanMa1991 I've tried your workaround but as I thought It's not working, since it has the 25 limit. Error matching coordinates: invalidInput(message: Optional("Too many coordinates; maximum number of coordinates is 25."))

Is it possible to use mapmatching somehow without the 25 limit? So like plotting the route directly on the map after mapmatching?

csongorkeller avatar Mar 11 '21 10:03 csongorkeller

@ShanMa1991 thought it would be useful to give you some context to our issue and use case.

We currently have a custom server and API which plots a route on a map based on user preferences (elevation, time, distance etc.), coordinates returned for each route are between 500-1000. These coordinates are then passed to the Map-matching API so we can format data for the Navigation SDK. We need the turn-by-by directions and route in the Nav to be the same if not as close as possible to the original route, so don't want any new routes calculated on top of the supplied route. We can not use waypoints as there is a limit of 25, we have had our limit of coordinates raised to 1000 for the Map-matching API.

So ideally we need to use the Map-matching API and have the directions passed to the Nav SDK and navigate through that route. If theres another method were unaware of please let us know.

jackgregory avatar Mar 11 '21 11:03 jackgregory

Going back to the original post, I don’t think it should be necessary to create or modify a NavigationRouteOptions within the completion handler of Directions.calculateRoutes(matching:completionHandler:). The options in the response should be good enough to pass into MapboxNavigationService. If you want to match against the cycling routing graph in the first place, pass .cycling into NavigationMatchOptions(coordinates:profileIdentifier:). You can also set options like locale and distanceMeasurementSystem on the NavigationMatchOptions before calling Directions.calculateRoutes(matching:completionHandler:). allowsUTurnAtWaypoint (continue_straight) is only supported with the Directions API, not the Map Matching API.

1ec5 avatar Mar 11 '21 17:03 1ec5

Thanks for the response @1ec5 but this doesn't work either. Since the option in response is a ResponseOptions and MapboxNavigationService wants RouteOptions. So I can not simply use the response options in navigationService as you proposed. Do you have any more idea how it can be used? Btw does it make any difference if I set NavigationMatchOptions(coordinates:profileIdentifier:) before calling Directions.calculateRoutes(matching:completionHandler:) ? Coz in my case it's completely independent of the response, but of the coordinates I have to mapmatch

Also I haven't found much documentation on how mapmatching should be used with custom coordinates. Do you have anything that might be missed?

csongorkeller avatar Mar 15 '21 15:03 csongorkeller

please find the project here: https://github.com/csongorkeller/flutter_mapbox_navigation/blob/master/ios/Classes/SwiftFlutterMapboxNavigationPlugin.swift

csongorkeller avatar Mar 15 '21 15:03 csongorkeller

Since the option in response is a ResponseOptions and MapboxNavigationService wants RouteOptions.

ResponseOptions is an enumeration: if it happens to be a route, then a RouteOptions is associated with it; if it’s a match, then a MatchOptions is associated with it. You can check the enumeration value using a switch or case let statement. As it happens, Directions.calculateRoutes(matching:completionHandler:) will set it to a match, which isn’t what NavigationService expects. Fortunately, you can convert it to a RouteOptions using the RouteOptions(matchOptions:) initializer:

guard case let .match(matchOptions) = response.options else { return }
let routeOptions = RouteOptions(matchOptions: matchOptions)

Btw does it make any difference if I set NavigationMatchOptions(coordinates:profileIdentifier:) before calling Directions.calculateRoutes(matching:completionHandler:) ? Coz in my case it's completely independent of the response, but of the coordinates I have to mapmatch

Directions.calculateRoutes(matching:completionHandler:) takes a MatchOptions as its first argument. You’d need to have already created the NavigationMatchOptions by that point in order to pass it into the method. This NavigationMatchOptions object is what determines how the Mapbox Map Matching API adapts your input coordinates to the Mapbox routing graph.

Also I haven't found much documentation on how mapmatching should be used with custom coordinates. Do you have anything that might be missed?

If you haven’t seen it already, this example demonstrates using Directions.calculateRoutes(matching:completionHandler:) to go from custom coordinates to a Mapbox-like route response.

1ec5 avatar Mar 17 '21 01:03 1ec5

Great @1ec5, many thanks for this. Although when starting the navigation at the end, I haven't found a workaround for how to assign a NavigationMatchOption to NavigationViewController(routeOptions:) as it works with NavigationRouteOptions instead. It's necessary to set some additional settings, like presenting full screen and localize the labels etc.

Hereby the method for starting the navigation:

   func startNavigation(route: Route, options: NavigationMatchOptions, navOptions: NavigationOptions)
    {
        isEmbeddedNavigation = false
        if(self._navigationViewController == nil)
        {
            self._navigationViewController = NavigationViewController(for: route, routeOptions: options, navigationOptions: navOptions)
            self._navigationViewController!.modalPresentationStyle = .fullScreen
            self._navigationViewController!.delegate = self
            self._navigationViewController!.mapView?.localizeLabels()
        }
        let flutterViewController = UIApplication.shared.delegate?.window??.rootViewController as! FlutterViewController
        flutterViewController.present(self._navigationViewController!, animated: true, completion: nil)
    }

csongorkeller avatar Mar 17 '21 10:03 csongorkeller

By the time you’re in the completion handler of Directions.calculateRoutes(matching:completionHandler:), you basically want to pretend you were working with a NavigationRouteOptions all along. So pass that converted NavigationRouteOptions from https://github.com/mapbox/mapbox-directions-swift/issues/526#issuecomment-800722747 into the NavigationViewController initializer too.

As far as the navigation SDK is concerned, it’ll have been a normal Directions API response all along. Depending on your application’s intended rerouting behavior, this may be problematic, because you might want the user to stay on the map-matched route instead of a more optimal route returned by the Directions API. In that case, you could implement NavigationViewControllerDelegate.navigationViewController(_:shouldRerouteFrom:) to preempt the reroute and manually call back out to the Map Matching API, setting a new route once you get a response.

1ec5 avatar Mar 17 '21 19:03 1ec5

Thanks @1ec5 this did the trick, Although now I'm facing another small problem. Well, actually 2 of them.

  1. When assigning the route to navigation, I got back a lot of fake routes. Do you have any idea how they can be filtered out? This image shows how the points should look like: Screenshot 2021-03-19 at 14 38 21

And As you see, I got back a lot of fake points: Screenshot 2021-03-19 at 14 40 14

  1. My second problem is that I receive back 0 matching in many cases, meaning the response is NoMatch Do you know why this happens? And how can be fixed to receive matches all the time?

Many thanks for your help

csongorkeller avatar Mar 19 '21 13:03 csongorkeller

@1ec5 Do you have any idea why the above-mentioned behavior appears? I haven't found anything mentioning this problem... Thanks in advance

csongorkeller avatar Mar 23 '21 09:03 csongorkeller

When assigning the route to navigation, I got back a lot of fake routes. Do you have any idea how they can be filtered out?

These results look like they could be submatches, but it’s hard to know without the specific request that you sent. Could you contact Mapbox Support or your Mapbox account representative so we can rule out a server-side or one-off problem? Please include the specific tracepoints/waypoints you used and any configuration options, or better yet, the full URL and request body returned by Directions.urlRequest(forCalculating:)? (If it is indeed submatches, this library incidentally doesn’t handle them correctly: #386.)

My second problem is that I receive back 0 matching in many cases, meaning the response is NoMatch Do you know why this happens? And how can be fixed to receive matches all the time?

Common reasons for returning no match include requesting tracepoints that go against the flow of traffic or pass a road closure (which may be time-dependent). If your input data comes from one mode of transportation but you’re requesting a match against a different profile (for example, matching your morning jog through a park to the road network), that can easily lead to missing or circuitous matches.

It looks like the original issue reported above has been addressed, so please open a new issue if you run into any other roadblocks that are specific to the MapboxDirections library as opposed to the Map Matching API, and definitely write into Mapbox Support if you encounter anything that may be API-related. Thanks for taking the time to report and write up these issues!

1ec5 avatar Mar 23 '21 17:03 1ec5

@1ec5 I think the above mentioned issues are still related to mapmatching and navigation. Hereby the request when I got back submatches although the backend uses cycling as profile and data comes from OSM. This is what I'm trying to match with cycling as profile via matching API. Hereby the request URL when receiving back submatches: https://api.mapbox.com/matching/v5/mapbox/cycling/-0.246375,51.493362%3B-0.246066,51.493326%3B-0.234663,51.490981%3B-0.227074,51.487079%3B-0.214955,51.489141%3B-0.216299,51.484171%3B-0.223929,51.481667%3B-0.228647,51.488669%3B-0.235726,51.491443%3B-0.242534,51.492676%3B-0.232131,51.489985%3B-0.224711,51.486791%3B-0.214047,51.488082%3B-0.216414,51.4833%3B-0.22365,51.48209%3B-0.228631,51.488878%3B-0.239832,51.491428%3B-0.240302,51.491423%3B-0.228755,51.488823%3B-0.223513,51.487202%3B-0.214209,51.487393%3B-0.220426,51.480706%3B-0.224205,51.482896%3B-0.231055,51.489526%3B-0.242415,51.491789%3B-0.237333,51.491491%3B-0.22855,51.488824%3B-0.222016,51.487779%3B-0.214989,51.485057%3B-0.222936,51.479373%3B-0.22677,51.48675%3B-0.234542,51.490703%3B-0.245569,51.493329%3B-0.23514,51.491168%3B-0.227812,51.487693%3B-0.217648,51.488359%3B-0.215401,51.484333%3B-0.223712,51.479492%3B-0.228578,51.488443%3B-0.235121,51.491381%3B-0.244698,51.493375%3B-0.233871,51.490426%3B-0.226108,51.486337%3B-0.214233,51.488258%3B-0.216339,51.483692%3B-0.223513,51.481888%3B-0.228557,51.488866%3B-0.239122,51.491469%3B-0.241558,51.491242%3B-0.229655,51.489163%3B-0.22396,51.487073%3B-0.214232,51.487487%3B-0.217861,51.481479%3B-0.22377,51.482081%3B-0.229338,51.489082%3B-0.241136,51.491319%3B-0.239233,51.491469%3B-0.228564,51.488873%3B-0.222353,51.487637%3B-0.214303,51.486464%3B-0.222745,51.479707%3B-0.22551,51.485019%3B-0.233194,51.49032%3B-0.244621,51.493421%3B-0.235281,51.491392%3B-0.228623,51.488494%3B-0.219914,51.488469%3B-0.215233,51.484427%3B-0.223361,51.479487%3B-0.227481,51.48738%3B-0.235143,51.491158%3B-0.245825,51.493326%3B-0.234644,51.490878%3B-0.226881,51.48687%3B-0.214881,51.489099%3B-0.216306,51.484143%3B-0.223932,51.481698%3B-0.228607,51.488735%3B-0.236244,51.491459%3B-0.242506,51.492321%3B-0.231311,51.489645%3B-0.224625,51.486802%3B-0.214025,51.488037%3B-0.216972,51.483361%3B-0.223661,51.482095%3B-0.228658,51.488868%3B-0.239985,51.491448%3B-0.239985,51.491448%3B-0.228658,51.488868%3B-0.223063,51.487376%3B-0.214029,51.487011%3B-0.221431,51.480393%3B-0.224409,51.483381%3B-0.231311,51.489645%3B-0.242506,51.492321%3B-0.236244,51.491459%3B-0.228607,51.488735%3B-0.22169,51.487896%3B-0.215099,51.484985%3B-0.222991,51.479347%3B-0.226881,51.48687%3B-0.234644,51.490878%3B-0.245825,51.493326%3B-0.235143,51.491158%3B-0.227481,51.48738%3B-0.216946,51.488557%3B-0.215394,51.484317%3B-0.223733,51.479682%3B-0.228623,51.488494%3B-0.235281,51.491392%3B-0.244621,51.493421%3B-0.233194,51.49032%3B-0.225746,51.486497%3B-0.214122,51.488173%3B-0.21634,51.483659%3B-0.223546,51.481959%3B-0.228564,51.488873%3B-0.239233,51.491469%3B-0.241136,51.491319%3B-0.229338,51.489082%3B-0.223907,51.487147%3B-0.213796,51.487573%3B-0.217947,51.48141%3B-0.223809,51.482092%3B-0.229655,51.489163%3B-0.241558,51.491242%3B-0.239122,51.491469%3B-0.228557,51.488866%3B-0.222364,51.487663%3B-0.214199,51.486166%3B-0.222669,51.479386%3B-0.225861,51.485544%3B-0.233871,51.490426%3B-0.244698,51.493375%3B-0.235121,51.491381%3B-0.228578,51.488443%3B-0.219347,51.488642%3B-0.215335,51.484403%3B-0.223386,51.479498%3B-0.227812,51.487693%3B-0.23514,51.491168%3B-0.245569,51.493329%3B-0.234542,51.490703%3B-0.22677,51.48675%3B-0.214769,51.489099%3B-0.216353,51.484003%3B-0.223936,51.481743%3B-0.22855,51.488824%3B-0.237333,51.491491%3B-0.242415,51.491789%3B-0.231055,51.489526%3B-0.22453,51.486835%3B-0.214012,51.488011%3B-0.217037,51.483148%3B-0.223673,51.482094%3B-0.228755,51.488823%3B-0.240302,51.491423%3B-0.239832,51.491428%3B-0.228631,51.488878%3B-0.22276,51.487503%3B-0.214415,51.486934%3B-0.222088,51.480213%3B-0.224459,51.483535%3B-0.232131,51.489985%3B-0.242534,51.492676%3B-0.235726,51.491443%3B-0.228647,51.488669%3B-0.221669,51.487906%3B-0.215164,51.484869%3B-0.223062,51.47932%3B-0.227074,51.487079%3B-0.234663,51.490981%3B-0.246066,51.493326%3B-0.246375,51.493362%3B-0.234672,51.491116%3B-0.227421,51.487325%3B-0.216246,51.488754%3B-0.215655,51.484273%3B-0.223832,51.480583%3B-0.228656,51.488598%3B-0.235314,51.491394%3B-0.244543,51.492585%3B-0.233131,51.490365%3B-0.225604,51.486552%3B-0.214032,51.488128%3B-0.216342,51.483587%3B-0.22358,51.48202%3B-0.228573,51.488877%3B-0.239443,51.491461%3B-0.240947,51.491346%3B-0.229167,51.489032%3B-0.223761,51.487138%3B-0.213766,51.487511%3B-0.218079,51.481385%3B-0.22385,51.482129%3B-0.230015,51.489253%3B-0.24219,51.491095%3B-0.238548,51.491486%3B-0.228549,51.488858%3B-0.222276,51.4877%3B-0.214669,51.486028%3B-0.222755,51.479383%3B-0.226392,51.486174%3B-0.23411,51.490467%3B-0.245164,51.493353%3B-0.235085,51.491378%3B-0.228403,51.488265%3B-0.218792,51.488032%3B-0.215368,51.484391%3B-0.22355,51.479476%3B-0.22822,51.488081%3B-0.235088,51.491367%3B-0.245413,51.493336%3B-0.234363,51.490446%3B-0.22635,51.486277%3B-0.214346,51.488436%3B-0.216468,51.483985%3B-0.223908,51.481762%3B-0.228544,51.488837%3B-0.23779,51.491491%3B-0.242302,51.491344%3B-0.23095,51.489485%3B-0.224085,51.486998%3B-0.214451,51.487951%3B-0.216745,51.483029%3B-0.223699,51.482083%3B-0.229081,51.489003%3B-0.240742,51.491376%3B-0.239599,51.491439%3B-0.228609,51.488881%3B-0.22257,51.48758%3B-0.214287,51.486698%3B-0.222851,51.480012%3B-0.224683,51.483862%3B-0.232241,51.490033%3B-0.243596,51.492635%3B-0.23531,51.491415%3B-0.228657,51.488637%3B-0.22152,51.487977%3B-0.21517,51.484771%3B-0.223143,51.479324%3B-0.227327,51.487321%3B-0.234669,51.491093%3B-0.246365,51.493315%3B-0.246365,51.493315%3B-0.234669,51.491093%3B-0.227327,51.487321%3B-0.21569,51.488911%3B-0.216227,51.484171%3B-0.223918,51.48155%3B-0.228657,51.488637%3B-0.23531,51.491415%3B-0.243596,51.492635%3B-0.232241,51.490033%3B-0.22526,51.486672%3B-0.21401,51.488117%3B-0.216365,51.483473%3B-0.223621,51.482067%3B-0.228609,51.488881%3B-0.239599,51.491439%3B-0.240742,51.491376%3B-0.229081,51.489003%3B-0.223653,51.487142%3B-0.213749,51.487477%3B-0.218818,51.48124%3B-0.224063,51.482446%3B-0.23095,51.489485%3B-0.242302,51.491344%3B-0.23779,51.491491%3B-0.228544,51.488837%3B-0.222191,51.487724%3B-0.215403,51.485829%3B-0.222837,51.479379%3B-0.22635,51.486277%3B-0.234363,51.490446%3B-0.245413,51.493336%3B-0.235088,51.491367%3B-0.22822,51.488081%3B-0.218225,51.488198%3B-0.215391,51.484383%3B-0.223711,51.479468%3B-0.228403,51.488265%3B-0.235085,51.491378%3B-0.245164,51.493353%3B-0.23411,51.490467%3B-0.226392,51.486174%3B-0.214309,51.488377%3B-0.21637,51.483841%3B-0.223858,51.48178%3B-0.228549,51.488858%3B-0.238548,51.491486%3B-0.24219,51.491095%3B-0.230015,51.489253%3B-0.224015,51.487034%3B-0.214399,51.487841%3B-0.216453,51.482768%3B-0.223732,51.482078%3B-0.229167,51.489032%3B-0.240947,51.491346%3B-0.239443,51.491461%3B-0.228573,51.488877%3B-0.222502,51.487572%3B-0.214196,51.486499%3B-0.222768,51.479773%3B-0.224985,51.484337%3B-0.233131,51.490365%3B-0.244543,51.492585%3B-0.235314,51.491394%3B-0.228656,51.488598%3B-0.220865,51.488178%3B-0.215162,51.484568%3B-0.223201,51.47936%3B-0.227421,51.487325%3B-0.234672,51.491116.json?geometries=polyline6&overview=full&steps=true&language=gb&voice_instructions=true&voice_units=imperial&banner_instructions=true&annotations=duration,congestion&tidy=false&waypoints=0;313&access_token=***

And hereby the response body:

  - httpResponse : nil
  - identifier : nil
  ▿ routes : Optional<Array<Route>>
    ▿ some : 1 element
      - 0 : Great West Road, Queen Caroline Street
  ▿ waypoints : Optional<Array<Waypoint>>
    ▿ some : 306 elements
      ▿ 0 : <latitude: 51.493362; longitude: -0.246377>
      ▿ 1 : Chiswick High Road
      ▿ 2 : <latitude: 51.491093; longitude: -0.234669>
      ▿ 3 : <latitude: 51.487079; longitude: -0.227074>
      ▿ 4 : <latitude: 51.489141; longitude: -0.214955>
      ▿ 5 : <latitude: 51.484171; longitude: -0.216299>
      ▿ 6 : <latitude: 51.481666; longitude: -0.223995>
      ▿ 7 : <latitude: 51.488669; longitude: -0.228647>
      ▿ 8 : Great West Road
      ▿ 9 : St Peter's Villas
      ▿ 10 : Lower Mall
      ▿ 11 : Winslow Road
      ▿ 12 : <latitude: 51.488045; longitude: -0.214066>
      ▿ 13 : Lillie Road
      ▿ 14 : Crabtree Lane
      ▿ 15 : <latitude: 51.488869; longitude: -0.228546>
      ▿ 16 : Great West Road
      ▿ 17 : Great West Road
      ▿ 18 : Queen Caroline Street
      ▿ 19 : Winslow Road
      ▿ 20 : <latitude: 51.487393; longitude: -0.214209>
      ▿ 21 : Lysia Street
      ▿ 22 : <latitude: 51.482896; longitude: -0.224205>
      ▿ 23 : Lower Mall
      ▿ 24 : St Peter's Road
      ▿ 25 : Great West Road
      ▿ 26 : Queen Caroline Street
      ▿ 27 : Fulham Palace Road
      ▿ 28 : <latitude: 51.485057; longitude: -0.214989>
      ▿ 29 : <latitude: 51.479373; longitude: -0.222936>
      ▿ 30 : <latitude: 51.48675; longitude: -0.22677>
      ▿ 31 : <latitude: 51.490703; longitude: -0.234542>
      ▿ 32 : Chiswick High Road
      ▿ 33 : <latitude: 51.491168; longitude: -0.23514>
      ▿ 34 : <latitude: 51.487693; longitude: -0.227812>
      ▿ 35 : <latitude: 51.479568; longitude: -0.22358>
      ▿ 36 : <latitude: 51.488443; longitude: -0.228578>
      ▿ 37 : <latitude: 51.491381; longitude: -0.235121>
      ▿ 38 : St Peter's Square
      ▿ 39 : Lower Mall
      ▿ 40 : <latitude: 51.486337; longitude: -0.226108>
      ▿ 41 : <latitude: 51.488369; longitude: -0.214247>
      ▿ 42 : Everington Street
      ▿ 43 : Crabtree Lane
      ▿ 44 : <latitude: 51.488869; longitude: -0.228546>
      ▿ 45 : Great West Road
      ▿ 46 : Great West Road
      ▿ 47 : <latitude: 51.489163; longitude: -0.229655>
      ▿ 48 : Winslow Road
      ▿ 49 : <latitude: 51.487487; longitude: -0.214232>
      ▿ 50 : <latitude: 51.481479; longitude: -0.217861>
      ▿ 51 : <latitude: 51.482081; longitude: -0.22377>
      ▿ 52 : Lower Mall
      ▿ 53 : Great West Road
      ▿ 54 : Great West Road
      ▿ 55 : Queen Caroline Street
      ▿ 56 : Winslow Road
      ▿ 57 : <latitude: 51.486464; longitude: -0.214303>
      ▿ 58 : <latitude: 51.479707; longitude: -0.222745>
      ▿ 59 : <latitude: 51.485019; longitude: -0.22551>
      ▿ 60 : Lower Mall
      ▿ 61 : St Peter's Square
      ▿ 62 : Great West Road
      ▿ 63 : <latitude: 51.488494; longitude: -0.228623>
      ▿ 64 : St Dunstan's Road
      ▿ 65 : <latitude: 51.484427; longitude: -0.215233>
      ▿ 66 : <latitude: 51.479487; longitude: -0.223361>
      ▿ 67 : <latitude: 51.48738; longitude: -0.227482>
      ▿ 68 : <latitude: 51.491158; longitude: -0.235143>
      ▿ 69 : Chiswick High Road
      ▿ 70 : <latitude: 51.490878; longitude: -0.234644>
      ▿ 71 : <latitude: 51.48687; longitude: -0.226881>
      ▿ 72 : <latitude: 51.489099; longitude: -0.214881>
      ▿ 73 : <latitude: 51.484143; longitude: -0.216306>
      ▿ 74 : <latitude: 51.481697; longitude: -0.223996>
      ▿ 75 : <latitude: 51.488735; longitude: -0.228607>
      ▿ 76 : Great West Road
      ▿ 77 : Black Lion Lane
      ▿ 78 : <latitude: 51.489645; longitude: -0.231312>
      ▿ 79 : Winslow Road
      ▿ 80 : <latitude: 51.488037; longitude: -0.214025>
      ▿ 81 : Lillie Road
      ▿ 82 : <latitude: 51.482095; longitude: -0.223661>
      ▿ 83 : <latitude: 51.488869; longitude: -0.228546>
      ▿ 84 : Great West Road
      ▿ 85 : Great West Road
      ▿ 86 : Queen Caroline Street
      ▿ 87 : Winslow Road
      ▿ 88 : <latitude: 51.487011; longitude: -0.214029>
      ▿ 89 : Lysia Street
      ▿ 90 : <latitude: 51.483381; longitude: -0.224409>
      ▿ 91 : <latitude: 51.489645; longitude: -0.231312>
      ▿ 92 : Black Lion Lane
      ▿ 93 : Great West Road
      ▿ 94 : <latitude: 51.488735; longitude: -0.228607>
      ▿ 95 : St Dunstan's Road
      ▿ 96 : <latitude: 51.484985; longitude: -0.215099>
      ▿ 97 : <latitude: 51.479347; longitude: -0.222991>
      ▿ 98 : <latitude: 51.48687; longitude: -0.226881>
      ▿ 99 : <latitude: 51.490878; longitude: -0.234644>
      ▿ 100 : Chiswick High Road
      ▿ 101 : <latitude: 51.491158; longitude: -0.235143>
      ▿ 102 : <latitude: 51.48738; longitude: -0.227482>
      ▿ 103 : <latitude: 51.4797; longitude: -0.223727>
      ▿ 104 : <latitude: 51.488494; longitude: -0.228623>
      ▿ 105 : <latitude: 51.491392; longitude: -0.235281>
      ▿ 106 : St Peter's Square
      ▿ 107 : Lower Mall
      ▿ 108 : <latitude: 51.486497; longitude: -0.225746>
      ▿ 109 : <latitude: 51.488068; longitude: -0.214177>
      ▿ 110 : Everington Street
      ▿ 111 : Crabtree Lane
      ▿ 112 : <latitude: 51.488869; longitude: -0.228546>
      ▿ 113 : Great West Road
      ▿ 114 : Great West Road
      ▿ 115 : Lower Mall
      ▿ 116 : Winslow Road
      ▿ 117 : Field Road
      ▿ 118 : <latitude: 51.481479; longitude: -0.217861>
      ▿ 119 : <latitude: 51.482092; longitude: -0.223809>
      ▿ 120 : Lower Mall
      ▿ 121 : Great West Road
      ▿ 122 : Great West Road
      ▿ 123 : Queen Caroline Street
      ▿ 124 : Winslow Road
      ▿ 125 : Margravine Road
      ▿ 126 : <latitude: 51.479386; longitude: -0.222669>
      ▿ 127 : <latitude: 51.485544; longitude: -0.225861>
      ▿ 128 : Lower Mall
      ▿ 129 : St Peter's Square
      ▿ 130 : Great West Road
      ▿ 131 : <latitude: 51.488443; longitude: -0.228578>
      ▿ 132 : Margravine Road
      ▿ 133 : Ancill Close
      ▿ 134 : <latitude: 51.479501; longitude: -0.223379>
      ▿ 135 : <latitude: 51.487693; longitude: -0.227812>
      ▿ 136 : <latitude: 51.491168; longitude: -0.23514>
      ▿ 137 : Chiswick High Road
      ▿ 138 : <latitude: 51.490703; longitude: -0.234542>
      ▿ 139 : <latitude: 51.48675; longitude: -0.22677>
      ▿ 140 : <latitude: 51.489099; longitude: -0.214769>
      ▿ 141 : Everington Street
      ▿ 142 : <latitude: 51.481752; longitude: -0.223943>
      ▿ 143 : <latitude: 51.488816; longitude: -0.22853>
      ▿ 144 : Great West Road
      ▿ 145 : Black Lion Lane
      ▿ 146 : Lower Mall
      ▿ 147 : Winslow Road
      ▿ 148 : Field Road
      ▿ 149 : <latitude: 51.483148; longitude: -0.217037>
      ▿ 150 : <latitude: 51.482094; longitude: -0.223673>
      ▿ 151 : <latitude: 51.48876; longitude: -0.228583>
      ▿ 152 : Great West Road
      ▿ 153 : Great West Road
      ▿ 154 : Queen Caroline Street
      ▿ 155 : Winslow Road
      ▿ 156 : <latitude: 51.486934; longitude: -0.214415>
      ▿ 157 : Lysia Street
      ▿ 158 : <latitude: 51.483535; longitude: -0.224459>
      ▿ 159 : Lower Mall
      ▿ 160 : St Peter's Villas
      ▿ 161 : Great West Road
      ▿ 162 : <latitude: 51.488669; longitude: -0.228647>
      ▿ 163 : St Dunstan's Road
      ▿ 164 : <latitude: 51.484869; longitude: -0.215164>
      ▿ 165 : <latitude: 51.47932; longitude: -0.223062>
      ▿ 166 : <latitude: 51.487079; longitude: -0.227074>
      ▿ 167 : <latitude: 51.491093; longitude: -0.234669>
      ▿ 168 : Chiswick High Road
      ▿ 169 : Chiswick High Road
      ▿ 170 : <latitude: 51.491116; longitude: -0.234672>
      ▿ 171 : <latitude: 51.48738; longitude: -0.227482>
      ▿ 172 : <latitude: 51.488754; longitude: -0.216246>
      ▿ 173 : <latitude: 51.484273; longitude: -0.215655>
      ▿ 174 : <latitude: 51.480583; longitude: -0.223856>
      ▿ 175 : <latitude: 51.488598; longitude: -0.228657>
      ▿ 176 : <latitude: 51.491394; longitude: -0.235314>
      ▿ 177 : St Peter's Square
      ▿ 178 : <latitude: 51.490365; longitude: -0.233131>
      ▿ 179 : <latitude: 51.486497; longitude: -0.225746>
      ▿ 180 : <latitude: 51.488047; longitude: -0.214074>
      ▿ 181 : Everington Street
      ▿ 182 : Crabtree Lane
      ▿ 183 : <latitude: 51.488869; longitude: -0.228546>
      ▿ 184 : Great West Road
      ▿ 185 : <latitude: 51.491346; longitude: -0.240947>
      ▿ 186 : Beckett's Wharf
      ▿ 187 : Winslow Road
      ▿ 188 : Field Road
      ▿ 189 : Fulham Palace Road
      ▿ 190 : <latitude: 51.482129; longitude: -0.22385>
      ▿ 191 : Lower Mall
      ▿ 192 : <latitude: 51.491095; longitude: -0.24219>
      ▿ 193 : Great West Road
      ▿ 194 : Queen Caroline Street
      ▿ 195 : Winslow Road
      ▿ 196 : Greyhound Road
      ▿ 197 : <latitude: 51.479391; longitude: -0.22267>
      ▿ 198 : <latitude: 51.486174; longitude: -0.226392>
      ▿ 199 : Lower Mall
      ▿ 200 : King Street
      ▿ 201 : Great West Road
      ▿ 202 : <latitude: 51.488265; longitude: -0.228403>
      ▿ 203 : Margravine Road
      ▿ 204 : Ancill Close
      ▿ 205 : <latitude: 51.479568; longitude: -0.22358>
      ▿ 206 : <latitude: 51.488081; longitude: -0.22822>
      ▿ 207 : <latitude: 51.491412; longitude: -0.234905>
      ▿ 208 : <latitude: 51.493376; longitude: -0.245342>
      ▿ 209 : <latitude: 51.490446; longitude: -0.234363>
      ▿ 210 : <latitude: 51.486262; longitude: -0.226433>
      ▿ 211 : <latitude: 51.488436; longitude: -0.214347>
      ▿ 212 : Everington Street
      ▿ 213 : <latitude: 51.481762; longitude: -0.223908>
      ▿ 214 : <latitude: 51.488839; longitude: -0.228518>
      ▿ 215 : Great West Road
      ▿ 216 : Black Lion Lane
      ▿ 217 : Lower Mall
      ▿ 218 : Winslow Road
      ▿ 219 : <latitude: 51.487951; longitude: -0.214451>
      ▿ 220 : <latitude: 51.483029; longitude: -0.216745>
      ▿ 221 : <latitude: 51.482083; longitude: -0.223699>
      ▿ 222 : Beckett's Wharf
      ▿ 223 : Great West Road
      ▿ 224 : Great West Road
      ▿ 225 : Queen Caroline Street
      ▿ 226 : Winslow Road
      ▿ 227 : <latitude: 51.486698; longitude: -0.214287>
      ▿ 228 : Meadowbank Close
      ▿ 229 : <latitude: 51.483862; longitude: -0.224683>
      ▿ 230 : Lower Mall
      ▿ 231 : St Peter's Square
      ▿ 232 : Great West Road
      ▿ 233 : <latitude: 51.488637; longitude: -0.228657>
      ▿ 234 : St Dunstan's Road
      ▿ 235 : <latitude: 51.484771; longitude: -0.21517>
      ▿ 236 : <latitude: 51.479324; longitude: -0.223143>
      ▿ 237 : <latitude: 51.487321; longitude: -0.227327>
      ▿ 238 : <latitude: 51.491093; longitude: -0.234669>
      ▿ 239 : <latitude: 51.493315; longitude: -0.246365>
      ▿ 240 : Chiswick High Road
      ▿ 241 : <latitude: 51.491093; longitude: -0.234669>
      ▿ 242 : <latitude: 51.487407; longitude: -0.227417>
      ▿ 243 : <latitude: 51.488911; longitude: -0.21569>
      ▿ 244 : <latitude: 51.484171; longitude: -0.216299>
      ▿ 245 : <latitude: 51.481605; longitude: -0.223954>
      ▿ 246 : <latitude: 51.488637; longitude: -0.228657>
      ▿ 247 : <latitude: 51.491415; longitude: -0.23531>
      ▿ 248 : St Peter's Square
      ▿ 249 : <latitude: 51.488042; longitude: -0.214049>
      ▿ 250 : Everington Street
      ▿ 251 : Crabtree Lane
      ▿ 252 : <latitude: 51.488869; longitude: -0.228546>
      ▿ 253 : Great West Road
      ▿ 254 : Great West Road
      ▿ 255 : Lower Mall
      ▿ 256 : Winslow Road
      ▿ 257 : <latitude: 51.487477; longitude: -0.213749>
      ▿ 258 : Lysia Street
      ▿ 259 : <latitude: 51.482446; longitude: -0.224063>
      ▿ 260 : Lower Mall
      ▿ 261 : <latitude: 51.491344; longitude: -0.242302>
      ▿ 262 : Great West Road
      ▿ 263 : Queen Caroline Street
      ▿ 264 : Fulham Palace Road
      ▿ 265 : <latitude: 51.485829; longitude: -0.215403>
      ▿ 266 : <latitude: 51.479394; longitude: -0.222671>
      ▿ 267 : <latitude: 51.486262; longitude: -0.226433>
      ▿ 268 : <latitude: 51.490446; longitude: -0.234363>
      ▿ 269 : Chiswick High Road
      ▿ 270 : <latitude: 51.491378; longitude: -0.235086>
      ▿ 271 : <latitude: 51.488081; longitude: -0.22822>
      ▿ 272 : <latitude: 51.479568; longitude: -0.22358>
      ▿ 273 : <latitude: 51.488265; longitude: -0.228403>
      ▿ 274 : <latitude: 51.491412; longitude: -0.234905>
      ▿ 275 : King Street
      ▿ 276 : Lower Mall
      ▿ 277 : <latitude: 51.486174; longitude: -0.226392>
      ▿ 278 : <latitude: 51.488377; longitude: -0.214309>
      ▿ 279 : Everington Street
      ▿ 280 : <latitude: 51.48178; longitude: -0.223858>
      ▿ 281 : <latitude: 51.488865; longitude: -0.228539>
      ▿ 282 : <latitude: 51.491486; longitude: -0.238548>
      ▿ 283 : Great West Road
      ▿ 284 : Lower Mall
      ▿ 285 : Winslow Road
      ▿ 286 : <latitude: 51.487841; longitude: -0.214399>
      ▿ 287 : <latitude: 51.482768; longitude: -0.216454>
      ▿ 288 : <latitude: 51.482078; longitude: -0.223732>
      ▿ 289 : Beckett's Wharf
      ▿ 290 : <latitude: 51.491346; longitude: -0.240947>
      ▿ 291 : Great West Road
      ▿ 292 : Queen Caroline Street
      ▿ 293 : Winslow Road
      ▿ 294 : <latitude: 51.486499; longitude: -0.214196>
      ▿ 295 : <latitude: 51.479773; longitude: -0.222768>
      ▿ 296 : <latitude: 51.484337; longitude: -0.224985>
      ▿ 297 : Lower Mall
      ▿ 298 : St Peter's Square
      ▿ 299 : Great West Road
      ▿ 300 : <latitude: 51.488598; longitude: -0.228657>
      ▿ 301 : St Dunstan's Road
      ▿ 302 : <latitude: 51.484568; longitude: -0.215162>
      ▿ 303 : <latitude: 51.47936; longitude: -0.223201>
      ▿ 304 : <latitude: 51.487325; longitude: -0.227421>
      ▿ 305 : <latitude: 51.491093; longitude: -0.234669>
  ▿ options : ResponseOptions
    - match : <NavigationMatchOptions: 0x600002f4ee80>
  ▿ credentials : DirectionsCredentials
    ▿ accessToken : Optional<String>
      - some : "***"
    ▿ host : https://api.mapbox.com
      - _url : https://api.mapbox.com
  ▿ created : 2021-03-24 13:07:02 +0000
    - timeIntervalSinceReferenceDate : 638284022.826071```

csongorkeller avatar Mar 24 '21 13:03 csongorkeller

And here is a case when there are valid coordinates but receive NoMatching back for some reason. Coordinates:

[__C.CLLocationCoordinate2D(latitude: 51.5344949, longitude: -0.0782042), __C.CLLocationCoordinate2D(latitude: 51.5362409, longitude: -0.0736132), __C.CLLocationCoordinate2D(latitude: 51.5397824, longitude: -0.059662), __C.CLLocationCoordinate2D(latitude: 51.5470545, longitude: -0.0493699), __C.CLLocationCoordinate2D(latitude: 51.5452464, longitude: -0.0358018), __C.CLLocationCoordinate2D(latitude: 51.5355634, longitude: -0.0463987), __C.CLLocationCoordinate2D(latitude: 51.5350227, longitude: -0.0611337), __C.CLLocationCoordinate2D(latitude: 51.5350026, longitude: -0.0724809), __C.CLLocationCoordinate2D(latitude: 51.5365373, longitude: -0.0769958), __C.CLLocationCoordinate2D(latitude: 51.5379621, longitude: -0.0607484), __C.CLLocationCoordinate2D(latitude: 51.5470322, longitude: -0.0510941), __C.CLLocationCoordinate2D(latitude: 51.5452375, longitude: -0.0374462), __C.CLLocationCoordinate2D(latitude: 51.5365908, longitude: -0.0431926), __C.CLLocationCoordinate2D(latitude: 51.5342121, longitude: -0.0595839), __C.CLLocationCoordinate2D(latitude: 51.5359275, longitude: -0.0719338), __C.CLLocationCoordinate2D(latitude: 51.5367817, longitude: -0.0782744), __C.CLLocationCoordinate2D(latitude: 51.5376919, longitude: -0.0609403), __C.CLLocationCoordinate2D(latitude: 51.5473986, longitude: -0.0534471), __C.CLLocationCoordinate2D(latitude: 51.5452974, longitude: -0.0416026), __C.CLLocationCoordinate2D(latitude: 51.5380619, longitude: -0.0409148), __C.CLLocationCoordinate2D(latitude: 51.5343548, longitude: -0.0577784), __C.CLLocationCoordinate2D(latitude: 51.5360457, longitude: -0.0719992), __C.CLLocationCoordinate2D(latitude: 51.5372187, longitude: -0.0813476), __C.CLLocationCoordinate2D(latitude: 51.536605, longitude: -0.0622305), __C.CLLocationCoordinate2D(latitude: 51.547145, longitude: -0.0550091), __C.CLLocationCoordinate2D(latitude: 51.5451304, longitude: -0.0423728), __C.CLLocationCoordinate2D(latitude: 51.5413843, longitude: -0.0380225), __C.CLLocationCoordinate2D(latitude: 51.5350734, longitude: -0.0556027), __C.CLLocationCoordinate2D(latitude: 51.5359073, longitude: -0.0698067), __C.CLLocationCoordinate2D(latitude: 51.5373422, longitude: -0.0817935), __C.CLLocationCoordinate2D(latitude: 51.5363374, longitude: -0.0633407), __C.CLLocationCoordinate2D(latitude: 51.5465281, longitude: -0.0551609), __C.CLLocationCoordinate2D(latitude: 51.5448947, longitude: -0.0455925), __C.CLLocationCoordinate2D(latitude: 51.5417233, longitude: -0.037623), __C.CLLocationCoordinate2D(latitude: 51.5351859, longitude: -0.0534525), __C.CLLocationCoordinate2D(latitude: 51.5357344, longitude: -0.0666072), __C.CLLocationCoordinate2D(latitude: 51.5357772, longitude: -0.0820713), __C.CLLocationCoordinate2D(latitude: 51.535778, longitude: -0.0642261), __C.CLLocationCoordinate2D(latitude: 51.5456649, longitude: -0.0564604), __C.CLLocationCoordinate2D(latitude: 51.544995, longitude: -0.0459308), __C.CLLocationCoordinate2D(latitude: 51.5440088, longitude: -0.0341071), __C.CLLocationCoordinate2D(latitude: 51.5350642, longitude: -0.0523934), __C.CLLocationCoordinate2D(latitude: 51.5357236, longitude: -0.0642031), __C.CLLocationCoordinate2D(latitude: 51.5345375, longitude: -0.0771497), __C.CLLocationCoordinate2D(latitude: 51.5352199, longitude: -0.0800695), __C.CLLocationCoordinate2D(latitude: 51.5357329, longitude: -0.0664924), __C.CLLocationCoordinate2D(latitude: 51.5447104, longitude: -0.0561217), __C.CLLocationCoordinate2D(latitude: 51.5463009, longitude: -0.0467409), __C.CLLocationCoordinate2D(latitude: 51.5446285, longitude: -0.0328852), __C.CLLocationCoordinate2D(latitude: 51.5340066, longitude: -0.0488657), __C.CLLocationCoordinate2D(latitude: 51.5357101, longitude: -0.0634464), __C.CLLocationCoordinate2D(latitude: 51.5345216, longitude: -0.0758162), __C.CLLocationCoordinate2D(latitude: 51.5352966, longitude: -0.0791443), __C.CLLocationCoordinate2D(latitude: 51.5358891, longitude: -0.0696446), __C.CLLocationCoordinate2D(latitude: 51.5422964, longitude: -0.0579718), __C.CLLocationCoordinate2D(latitude: 51.5466465, longitude: -0.0472773), __C.CLLocationCoordinate2D(latitude: 51.5449011, longitude: -0.0329026), __C.CLLocationCoordinate2D(latitude: 51.5344188, longitude: -0.0483467), __C.CLLocationCoordinate2D(latitude: 51.5356331, longitude: -0.0626393), __C.CLLocationCoordinate2D(latitude: 51.5348675, longitude: -0.0734736), __C.CLLocationCoordinate2D(latitude: 51.5351112, longitude: -0.0775114), __C.CLLocationCoordinate2D(latitude: 51.536034, longitude: -0.0718659), __C.CLLocationCoordinate2D(latitude: 51.5404082, longitude: -0.0593041), __C.CLLocationCoordinate2D(latitude: 51.5468344, longitude: -0.0485125), __C.CLLocationCoordinate2D(latitude: 51.5453158, longitude: -0.0355609), __C.CLLocationCoordinate2D(latitude: 51.5351118, longitude: -0.0474966), __C.CLLocationCoordinate2D(latitude: 51.535476, longitude: -0.0617455), __C.CLLocationCoordinate2D(latitude: 51.5349089, longitude: -0.0728758), __C.CLLocationCoordinate2D(latitude: 51.5364266, longitude: -0.0755896), __C.CLLocationCoordinate2D(latitude: 51.5386531, longitude: -0.0603389), __C.CLLocationCoordinate2D(latitude: 51.5471437, longitude: -0.0502184), __C.CLLocationCoordinate2D(latitude: 51.545248, longitude: -0.0369553), __C.CLLocationCoordinate2D(latitude: 51.5365324, longitude: -0.043673), __C.CLLocationCoordinate2D(latitude: 51.5345181, longitude: -0.0605213), __C.CLLocationCoordinate2D(latitude: 51.5354467, longitude: -0.0719845), __C.CLLocationCoordinate2D(latitude: 51.5367067, longitude: -0.0778678), __C.CLLocationCoordinate2D(latitude: 51.5378086, longitude: -0.0608403), __C.CLLocationCoordinate2D(latitude: 51.5471532, longitude: -0.0515908), __C.CLLocationCoordinate2D(latitude: 51.5452674, longitude: -0.0398882), __C.CLLocationCoordinate2D(latitude: 51.5367831, longitude: -0.0428998), __C.CLLocationCoordinate2D(latitude: 51.5341975, longitude: -0.0587947), __C.CLLocationCoordinate2D(latitude: 51.5361739, longitude: -0.0722014), __C.CLLocationCoordinate2D(latitude: 51.5369833, longitude: -0.0797875), __C.CLLocationCoordinate2D(latitude: 51.5372209, longitude: -0.0613576), __C.CLLocationCoordinate2D(latitude: 51.547266, longitude: -0.0539947), __C.CLLocationCoordinate2D(latitude: 51.5451878, longitude: -0.0418004), __C.CLLocationCoordinate2D(latitude: 51.5400025, longitude: -0.038794), __C.CLLocationCoordinate2D(latitude: 51.5345908, longitude: -0.0570285), __C.CLLocationCoordinate2D(latitude: 51.5360007, longitude: -0.0707067), __C.CLLocationCoordinate2D(latitude: 51.5374691, longitude: -0.0817133), __C.CLLocationCoordinate2D(latitude: 51.5365897, longitude: -0.063389), __C.CLLocationCoordinate2D(latitude: 51.5467975, longitude: -0.0550737), __C.CLLocationCoordinate2D(latitude: 51.5449012, longitude: -0.0440203), __C.CLLocationCoordinate2D(latitude: 51.5413213, longitude: -0.0374066), __C.CLLocationCoordinate2D(latitude: 51.5352466, longitude: -0.0545959), __C.CLLocationCoordinate2D(latitude: 51.535779, longitude: -0.0681661), __C.CLLocationCoordinate2D(latitude: 51.5367741, longitude: -0.0818605), __C.CLLocationCoordinate2D(latitude: 51.5363498, longitude: -0.0636466), __C.CLLocationCoordinate2D(latitude: 51.5463778, longitude: -0.0555474), __C.CLLocationCoordinate2D(latitude: 51.5448599, longitude: -0.0457696), __C.CLLocationCoordinate2D(latitude: 51.5426201, longitude: -0.0366136), __C.CLLocationCoordinate2D(latitude: 51.5350397, longitude: -0.0528445), __C.CLLocationCoordinate2D(latitude: 51.5357212, longitude: -0.0653589), __C.CLLocationCoordinate2D(latitude: 51.5354882, longitude: -0.0804465), __C.CLLocationCoordinate2D(latitude: 51.5357286, longitude: -0.0647532), __C.CLLocationCoordinate2D(latitude: 51.5454954, longitude: -0.0568708), __C.CLLocationCoordinate2D(latitude: 51.5454341, longitude: -0.0460459), __C.CLLocationCoordinate2D(latitude: 51.5446821, longitude: -0.0332015), __C.CLLocationCoordinate2D(latitude: 51.5345969, longitude: -0.0510564), __C.CLLocationCoordinate2D(latitude: 51.5356862, longitude: -0.0638924), __C.CLLocationCoordinate2D(latitude: 51.5345225, longitude: -0.0768016), __C.CLLocationCoordinate2D(latitude: 51.5350172, longitude: -0.0795853), __C.CLLocationCoordinate2D(latitude: 51.5357631, longitude: -0.0677825), __C.CLLocationCoordinate2D(latitude: 51.5433621, longitude: -0.0570942), __C.CLLocationCoordinate2D(latitude: 51.5464366, longitude: -0.0474306), __C.CLLocationCoordinate2D(latitude: 51.5447237, longitude: -0.03279), __C.CLLocationCoordinate2D(latitude: 51.5340661, longitude: -0.0487509), __C.CLLocationCoordinate2D(latitude: 51.535725, longitude: -0.0630792), __C.CLLocationCoordinate2D(latitude: 51.5346375, longitude: -0.0746492), __C.CLLocationCoordinate2D(latitude: 51.5353163, longitude: -0.0783344), __C.CLLocationCoordinate2D(latitude: 51.5359338, longitude: -0.0701092), __C.CLLocationCoordinate2D(latitude: 51.5411419, longitude: -0.0589778), __C.CLLocationCoordinate2D(latitude: 51.5467132, longitude: -0.0476826), __C.CLLocationCoordinate2D(latitude: 51.5451628, longitude: -0.0343938), __C.CLLocationCoordinate2D(latitude: 51.5350415, longitude: -0.0476451), __C.CLLocationCoordinate2D(latitude: 51.5355515, longitude: -0.0621793), __C.CLLocationCoordinate2D(latitude: 51.5346569, longitude: -0.0732347), __C.CLLocationCoordinate2D(latitude: 51.5345311, longitude: -0.0777307), __C.CLLocationCoordinate2D(latitude: 51.536138, longitude: -0.0722615), __C.CLLocationCoordinate2D(latitude: 51.5398485, longitude: -0.0596245), __C.CLLocationCoordinate2D(latitude: 51.5470232, longitude: -0.049246), __C.CLLocationCoordinate2D(latitude: 51.5452515, longitude: -0.0357441), __C.CLLocationCoordinate2D(latitude: 51.5354954, longitude: -0.0470103), __C.CLLocationCoordinate2D(latitude: 51.5351351, longitude: -0.061253), __C.CLLocationCoordinate2D(latitude: 51.5349714, longitude: -0.0724775), __C.CLLocationCoordinate2D(latitude: 51.5364982, longitude: -0.0767491), __C.CLLocationCoordinate2D(latitude: 51.5379805, longitude: -0.0607392), __C.CLLocationCoordinate2D(latitude: 51.5470449, longitude: -0.0510301), __C.CLLocationCoordinate2D(latitude: 51.5452369, longitude: -0.0371981), __C.CLLocationCoordinate2D(latitude: 51.5364848, longitude: -0.0433907), __C.CLLocationCoordinate2D(latitude: 51.5342389, longitude: -0.0597336), __C.CLLocationCoordinate2D(latitude: 51.5359057, longitude: -0.0719338), __C.CLLocationCoordinate2D(latitude: 51.5367818, longitude: -0.0782211), __C.CLLocationCoordinate2D(latitude: 51.5377104, longitude: -0.0609102), __C.CLLocationCoordinate2D(latitude: 51.5474687, longitude: -0.051803), __C.CLLocationCoordinate2D(latitude: 51.5452872, longitude: -0.0412086), __C.CLLocationCoordinate2D(latitude: 51.5377715, longitude: -0.0412375), __C.CLLocationCoordinate2D(latitude: 51.5343063, longitude: -0.0580479), __C.CLLocationCoordinate2D(latitude: 51.5360529, longitude: -0.0720489), __C.CLLocationCoordinate2D(latitude: 51.537183, longitude: -0.0813565), __C.CLLocationCoordinate2D(latitude: 51.5365724, longitude: -0.0619377), __C.CLLocationCoordinate2D(latitude: 51.5471697, longitude: -0.0550233), __C.CLLocationCoordinate2D(latitude: 51.5451323, longitude: -0.04234), __C.CLLocationCoordinate2D(latitude: 51.5412642, longitude: -0.0375362), __C.CLLocationCoordinate2D(latitude: 51.5349458, longitude: -0.0560626), __C.CLLocationCoordinate2D(latitude: 51.5359142, longitude: -0.0699125), __C.CLLocationCoordinate2D(latitude: 51.5373513, longitude: -0.0818673), __C.CLLocationCoordinate2D(latitude: 51.5363404, longitude: -0.0632875), __C.CLLocationCoordinate2D(latitude: 51.5465652, longitude: -0.0551581), __C.CLLocationCoordinate2D(latitude: 51.5448977, longitude: -0.0455252), __C.CLLocationCoordinate2D(latitude: 51.5416539, longitude: -0.0375288), __C.CLLocationCoordinate2D(latitude: 51.535194, longitude: -0.0534909), __C.CLLocationCoordinate2D(latitude: 51.5357415, longitude: -0.0669165), __C.CLLocationCoordinate2D(latitude: 51.5358303, longitude: -0.0820546), __C.CLLocationCoordinate2D(latitude: 51.5362756, longitude: -0.0642636), __C.CLLocationCoordinate2D(latitude: 51.5456334, longitude: -0.0560799), __C.CLLocationCoordinate2D(latitude: 51.5449865, longitude: -0.0459128), __C.CLLocationCoordinate2D(latitude: 51.5436603, longitude: -0.0345643), __C.CLLocationCoordinate2D(latitude: 51.5349657, longitude: -0.0524806), __C.CLLocationCoordinate2D(latitude: 51.5357302, longitude: -0.064269), __C.CLLocationCoordinate2D(latitude: 51.5345395, longitude: -0.0775157), __C.CLLocationCoordinate2D(latitude: 51.5352044, longitude: -0.08016), __C.CLLocationCoordinate2D(latitude: 51.5357248, longitude: -0.0660628), __C.CLLocationCoordinate2D(latitude: 51.5446982, longitude: -0.0565633), __C.CLLocationCoordinate2D(latitude: 51.5461192, longitude: -0.046628), __C.CLLocationCoordinate2D(latitude: 51.544695, longitude: -0.0330138), __C.CLLocationCoordinate2D(latitude: 51.5340173, longitude: -0.0488971), __C.CLLocationCoordinate2D(latitude: 51.5357087, longitude: -0.0635073), __C.CLLocationCoordinate2D(latitude: 51.5345096, longitude: -0.0759701), __C.CLLocationCoordinate2D(latitude: 51.5352051, longitude: -0.0796395), __C.CLLocationCoordinate2D(latitude: 51.5358016, longitude: -0.0685503), __C.CLLocationCoordinate2D(latitude: 51.5423623, longitude: -0.0579215), __C.CLLocationCoordinate2D(latitude: 51.5466355, longitude: -0.047289), __C.CLLocationCoordinate2D(latitude: 51.5448516, longitude: -0.0329122), __C.CLLocationCoordinate2D(latitude: 51.5341247, longitude: -0.0486398), __C.CLLocationCoordinate2D(latitude: 51.5356594, longitude: -0.0627234), __C.CLLocationCoordinate2D(latitude: 51.5348585, longitude: -0.0735615), __C.CLLocationCoordinate2D(latitude: 51.5351272, longitude: -0.0776142), __C.CLLocationCoordinate2D(latitude: 51.5360341, longitude: -0.0718345), __C.CLLocationCoordinate2D(latitude: 51.5407718, longitude: -0.0591261), __C.CLLocationCoordinate2D(latitude: 51.5468136, longitude: -0.0483671), __C.CLLocationCoordinate2D(latitude: 51.5452991, longitude: -0.0355097), __C.CLLocationCoordinate2D(latitude: 51.5350784, longitude: -0.0475289), __C.CLLocationCoordinate2D(latitude: 51.535496, longitude: -0.0618158), __C.CLLocationCoordinate2D(latitude: 51.5346044, longitude: -0.0726853), __C.CLLocationCoordinate2D(latitude: 51.5363727, longitude: -0.0751131), __C.CLLocationCoordinate2D(latitude: 51.5387064, longitude: -0.0603036), __C.CLLocationCoordinate2D(latitude: 51.547136, longitude: -0.050035), __C.CLLocationCoordinate2D(latitude: 51.5452495, longitude: -0.0365641), __C.CLLocationCoordinate2D(latitude: 51.5365229, longitude: -0.0437788), __C.CLLocationCoordinate2D(latitude: 51.5346457, longitude: -0.0607089), __C.CLLocationCoordinate2D(latitude: 51.5354163, longitude: -0.0724), __C.CLLocationCoordinate2D(latitude: 51.536659, longitude: -0.0774865), __C.CLLocationCoordinate2D(latitude: 51.5378387, longitude: -0.0608621), __C.CLLocationCoordinate2D(latitude: 51.5470848, longitude: -0.0515796), __C.CLLocationCoordinate2D(latitude: 51.5452562, longitude: -0.0394346), __C.CLLocationCoordinate2D(latitude: 51.5367593, longitude: -0.0429425), __C.CLLocationCoordinate2D(latitude: 51.5341844, longitude: -0.0588746), __C.CLLocationCoordinate2D(latitude: 51.5361715, longitude: -0.0720848), __C.CLLocationCoordinate2D(latitude: 51.5368842, longitude: -0.079052), __C.CLLocationCoordinate2D(latitude: 51.5375549, longitude: -0.0610716), __C.CLLocationCoordinate2D(latitude: 51.5472971, longitude: -0.0538482), __C.CLLocationCoordinate2D(latitude: 51.5451968, longitude: -0.0416985), __C.CLLocationCoordinate2D(latitude: 51.5392324, longitude: -0.0396139), __C.CLLocationCoordinate2D(latitude: 51.5345768, longitude: -0.0570556), __C.CLLocationCoordinate2D(latitude: 51.5360797, longitude: -0.0715289), __C.CLLocationCoordinate2D(latitude: 51.5374935, longitude: -0.0817078), __C.CLLocationCoordinate2D(latitude: 51.5366191, longitude: -0.0626094), __C.CLLocationCoordinate2D(latitude: 51.5468428, longitude: -0.055063), __C.CLLocationCoordinate2D(latitude: 51.5449122, longitude: -0.043712), __C.CLLocationCoordinate2D(latitude: 51.5414579, longitude: -0.0379841), __C.CLLocationCoordinate2D(latitude: 51.5352269, longitude: -0.054814), __C.CLLocationCoordinate2D(latitude: 51.535789, longitude: -0.0683685), __C.CLLocationCoordinate2D(latitude: 51.5370597, longitude: -0.0817986), __C.CLLocationCoordinate2D(latitude: 51.5363323, longitude: -0.0636352), __C.CLLocationCoordinate2D(latitude: 51.5463817, longitude: -0.0554904), __C.CLLocationCoordinate2D(latitude: 51.5448458, longitude: -0.0457346), __C.CLLocationCoordinate2D(latitude: 51.5420649, longitude: -0.0373947), __C.CLLocationCoordinate2D(latitude: 51.5350771, longitude: -0.0529656), __C.CLLocationCoordinate2D(latitude: 51.5357224, longitude: -0.0657124), __C.CLLocationCoordinate2D(latitude: 51.5356529, longitude: -0.0809649), __C.CLLocationCoordinate2D(latitude: 51.5357411, longitude: -0.0647533), __C.CLLocationCoordinate2D(latitude: 51.5456149, longitude: -0.0568721), __C.CLLocationCoordinate2D(latitude: 51.5452205, longitude: -0.0459941), __C.CLLocationCoordinate2D(latitude: 51.5446419, longitude: -0.0333352), __C.CLLocationCoordinate2D(latitude: 51.5348555, longitude: -0.0517718), __C.CLLocationCoordinate2D(latitude: 51.53569, longitude: -0.0639475), __C.CLLocationCoordinate2D(latitude: 51.5345253, longitude: -0.0768771), __C.CLLocationCoordinate2D(latitude: 51.5349674, longitude: -0.0798002), __C.CLLocationCoordinate2D(latitude: 51.5357519, longitude: -0.0673533), __C.CLLocationCoordinate2D(latitude: 51.5434133, longitude: -0.0570486), __C.CLLocationCoordinate2D(latitude: 51.5463521, longitude: -0.0473574), __C.CLLocationCoordinate2D(latitude: 51.5446927, longitude: -0.0327887), __C.CLLocationCoordinate2D(latitude: 51.5340642, longitude: -0.0487748), __C.CLLocationCoordinate2D(latitude: 51.535725, longitude: -0.0631702), __C.CLLocationCoordinate2D(latitude: 51.5346172, longitude: -0.0748032), __C.CLLocationCoordinate2D(latitude: 51.5353285, longitude: -0.0785588), __C.CLLocationCoordinate2D(latitude: 51.5359289, longitude: -0.0700654), __C.CLLocationCoordinate2D(latitude: 51.5417392, longitude: -0.058946), __C.CLLocationCoordinate2D(latitude: 51.5467064, longitude: -0.0475794), __C.CLLocationCoordinate2D(latitude: 51.5451212, longitude: -0.0343423), __C.CLLocationCoordinate2D(latitude: 51.5350567, longitude: -0.0476834), __C.CLLocationCoordinate2D(latitude: 51.5355657, longitude: -0.0622817), __C.CLLocationCoordinate2D(latitude: 51.5347997, longitude: -0.0732914), __C.CLLocationCoordinate2D(latitude: 51.5345349, longitude: -0.0775675), __C.CLLocationCoordinate2D(latitude: 51.5360779, longitude: -0.0721089), __C.CLLocationCoordinate2D(latitude: 51.5398704, longitude: -0.0596121), __C.CLLocationCoordinate2D(latitude: 51.5469742, longitude: -0.0490701), __C.CLLocationCoordinate2D(latitude: 51.5452557, longitude: -0.0356966), __C.CLLocationCoordinate2D(latitude: 51.5355003, longitude: -0.0471049), __C.CLLocationCoordinate2D(latitude: 51.5352193, longitude: -0.0613448), __C.CLLocationCoordinate2D(latitude: 51.5349479, longitude: -0.0724738), __C.CLLocationCoordinate2D(latitude: 51.5364978, longitude: -0.0767209), __C.CLLocationCoordinate2D(latitude: 51.5380032, longitude: -0.0607265), __C.CLLocationCoordinate2D(latitude: 51.5470901, longitude: -0.0508201), __C.CLLocationCoordinate2D(latitude: 51.5452379, longitude: -0.0370895), __C.CLLocationCoordinate2D(latitude: 51.5363758, longitude: -0.0435865), __C.CLLocationCoordinate2D(latitude: 51.5342875, longitude: -0.0599256), __C.CLLocationCoordinate2D(latitude: 51.5358847, longitude: -0.071934), __C.CLLocationCoordinate2D(latitude: 51.5367569, longitude: -0.0780018), __C.CLLocationCoordinate2D(latitude: 51.537728, longitude: -0.0608776), __C.CLLocationCoordinate2D(latitude: 51.5474505, longitude: -0.0517454), __C.CLLocationCoordinate2D(latitude: 51.5452851, longitude: -0.0411363), __C.CLLocationCoordinate2D(latitude: 51.537648, longitude: -0.0413749), __C.CLLocationCoordinate2D(latitude: 51.534251, longitude: -0.0583289), __C.CLLocationCoordinate2D(latitude: 51.5360779, longitude: -0.0721089), __C.CLLocationCoordinate2D(latitude: 51.5371788, longitude: -0.0812994), __C.CLLocationCoordinate2D(latitude: 51.5365598, longitude: -0.0618235), __C.CLLocationCoordinate2D(latitude: 51.547197, longitude: -0.05497), __C.CLLocationCoordinate2D(latitude: 51.5451371, longitude: -0.0422965), __C.CLLocationCoordinate2D(latitude: 51.5412347, longitude: -0.0375118), __C.CLLocationCoordinate2D(latitude: 51.5347904, longitude: -0.0565401), __C.CLLocationCoordinate2D(latitude: 51.5359289, longitude: -0.0700654), __C.CLLocationCoordinate2D(latitude: 51.5374775, longitude: -0.0818445), __C.CLLocationCoordinate2D(latitude: 51.5364261, longitude: -0.0632946), __C.CLLocationCoordinate2D(latitude: 51.5466852, longitude: -0.0551472), __C.CLLocationCoordinate2D(latitude: 51.5448968, longitude: -0.0453499), __C.CLLocationCoordinate2D(latitude: 51.5414305, longitude: -0.0371323), __C.CLLocationCoordinate2D(latitude: 51.5352458, longitude: -0.0538843), __C.CLLocationCoordinate2D(latitude: 51.5357519, longitude: -0.0673533), __C.CLLocationCoordinate2D(latitude: 51.536289, longitude: -0.0819483), __C.CLLocationCoordinate2D(latitude: 51.5363016, longitude: -0.0637383), __C.CLLocationCoordinate2D(latitude: 51.5457859, longitude: -0.0559785), __C.CLLocationCoordinate2D(latitude: 51.5449806, longitude: -0.0458634), __C.CLLocationCoordinate2D(latitude: 51.5435617, longitude: -0.034763), __C.CLLocationCoordinate2D(latitude: 51.5349327, longitude: -0.0525096), __C.CLLocationCoordinate2D(latitude: 51.5357304, longitude: -0.064443), __C.CLLocationCoordinate2D(latitude: 51.5345349, longitude: -0.0775675), __C.CLLocationCoordinate2D(latitude: 51.5353871, longitude: -0.0802398), __C.CLLocationCoordinate2D(latitude: 51.5357224, longitude: -0.0657124), __C.CLLocationCoordinate2D(latitude: 51.5446697, longitude: -0.0569026), __C.CLLocationCoordinate2D(latitude: 51.5461439, longitude: -0.0465243), __C.CLLocationCoordinate2D(latitude: 51.5446121, longitude: -0.0329977), __C.CLLocationCoordinate2D(latitude: 51.5340302, longitude: -0.0489347), __C.CLLocationCoordinate2D(latitude: 51.5356946, longitude: -0.063609), __C.CLLocationCoordinate2D(latitude: 51.5345087, longitude: -0.0760342), __C.CLLocationCoordinate2D(latitude: 51.5351904, longitude: -0.0796598), __C.CLLocationCoordinate2D(latitude: 51.535789, longitude: -0.0683685), __C.CLLocationCoordinate2D(latitude: 51.5425802, longitude: -0.0577783), __C.CLLocationCoordinate2D(latitude: 51.5466111, longitude: -0.0473145), __C.CLLocationCoordinate2D(latitude: 51.5448079, longitude: -0.032923), __C.CLLocationCoordinate2D(latitude: 51.5340887, longitude: -0.048683), __C.CLLocationCoordinate2D(latitude: 51.5356859, longitude: -0.0628048), __C.CLLocationCoordinate2D(latitude: 51.5348504, longitude: -0.0736231), __C.CLLocationCoordinate2D(latitude: 51.5351604, longitude: -0.0776214), __C.CLLocationCoordinate2D(latitude: 51.5360797, longitude: -0.0715289), __C.CLLocationCoordinate2D(latitude: 51.5410079, longitude: -0.0590037), __C.CLLocationCoordinate2D(latitude: 51.5467885, longitude: -0.0480486), __C.CLLocationCoordinate2D(latitude: 51.5452324, longitude: -0.0352576), __C.CLLocationCoordinate2D(latitude: 51.5350442, longitude: -0.047562), __C.CLLocationCoordinate2D(latitude: 51.5355135, longitude: -0.0619056), __C.CLLocationCoordinate2D(latitude: 51.5346142, longitude: -0.0728828), __C.CLLocationCoordinate2D(latitude: 51.536337, longitude: -0.0747068), __C.CLLocationCoordinate2D(latitude: 51.5387545, longitude: -0.060273), __C.CLLocationCoordinate2D(latitude: 51.5471298, longitude: -0.049954), __C.CLLocationCoordinate2D(latitude: 51.5452476, longitude: -0.0360949), __C.CLLocationCoordinate2D(latitude: 51.535891, longitude: -0.0446898), __C.CLLocationCoordinate2D(latitude: 51.5347588, longitude: -0.0608424), __C.CLLocationCoordinate2D(latitude: 51.535372, longitude: -0.0723943), __C.CLLocationCoordinate2D(latitude: 51.5366419, longitude: -0.0773507), __C.CLLocationCoordinate2D(latitude: 51.5378556, longitude: -0.0608206), __C.CLLocationCoordinate2D(latitude: 51.5469885, longitude: -0.051543), __C.CLLocationCoordinate2D(latitude: 51.5452338, longitude: -0.0385261), __C.CLLocationCoordinate2D(latitude: 51.5366243, longitude: -0.0432366), __C.CLLocationCoordinate2D(latitude: 51.534179, longitude: -0.0590859), __C.CLLocationCoordinate2D(latitude: 51.5361598, longitude: -0.0719232), __C.CLLocationCoordinate2D(latitude: 51.5367897, longitude: -0.0784721), __C.CLLocationCoordinate2D(latitude: 51.5375851, longitude: -0.0610469), __C.CLLocationCoordinate2D(latitude: 51.5473445, longitude: -0.0537373), __C.CLLocationCoordinate2D(latitude: 51.5452066, longitude: -0.0415987), __C.CLLocationCoordinate2D(latitude: 51.5383847, longitude: -0.040556), __C.CLLocationCoordinate2D(latitude: 51.5344994, longitude: -0.0571926), __C.CLLocationCoordinate2D(latitude: 51.5360341, longitude: -0.0718345), __C.CLLocationCoordinate2D(latitude: 51.5374811, longitude: -0.0815042), __C.CLLocationCoordinate2D(latitude: 51.5366391, longitude: -0.0624936), __C.CLLocationCoordinate2D(latitude: 51.5470195, longitude: -0.0550225), __C.CLLocationCoordinate2D(latitude: 51.5449363, longitude: -0.0435181), __C.CLLocationCoordinate2D(latitude: 51.5414515, longitude: -0.0379874), __C.CLLocationCoordinate2D(latitude: 51.5351997, longitude: -0.0550321), __C.CLLocationCoordinate2D(latitude: 51.5358016, longitude: -0.0685503), __C.CLLocationCoordinate2D(latitude: 51.537234, longitude: -0.0817594), __C.CLLocationCoordinate2D(latitude: 51.5363408, longitude: -0.0634893), __C.CLLocationCoordinate2D(latitude: 51.5463996, longitude: -0.0552769), __C.CLLocationCoordinate2D(latitude: 51.5448776, longitude: -0.0456839), __C.CLLocationCoordinate2D(latitude: 51.5419505, longitude: -0.0375465), __C.CLLocationCoordinate2D(latitude: 51.5351092, longitude: -0.0530901), __C.CLLocationCoordinate2D(latitude: 51.5357248, longitude: -0.0660628), __C.CLLocationCoordinate2D(latitude: 51.5357651, longitude: -0.0819619), __C.CLLocationCoordinate2D(latitude: 51.5357672, longitude: -0.0647533), __C.CLLocationCoordinate2D(latitude: 51.545656, longitude: -0.0568458), __C.CLLocationCoordinate2D(latitude: 51.5451639, longitude: -0.0459833), __C.CLLocationCoordinate2D(latitude: 51.5444001, longitude: -0.03363), __C.CLLocationCoordinate2D(latitude: 51.5351123, longitude: -0.0523194), __C.CLLocationCoordinate2D(latitude: 51.5356948, longitude: -0.063993), __C.CLLocationCoordinate2D(latitude: 51.534529, longitude: -0.0769783), __C.CLLocationCoordinate2D(latitude: 51.5349568, longitude: -0.0798459), __C.CLLocationCoordinate2D(latitude: 51.5357415, longitude: -0.0669165), __C.CLLocationCoordinate2D(latitude: 51.5434741, longitude: -0.05699), __C.CLLocationCoordinate2D(latitude: 51.5463306, longitude: -0.0472102), __C.CLLocationCoordinate2D(latitude: 51.5446738, longitude: -0.0328007), __C.CLLocationCoordinate2D(latitude: 51.534068, longitude: -0.0488088), __C.CLLocationCoordinate2D(latitude: 51.5357222, longitude: -0.0632515), __C.CLLocationCoordinate2D(latitude: 51.5345543, longitude: -0.0754426), __C.CLLocationCoordinate2D(latitude: 51.5353673, longitude: -0.0786301), __C.CLLocationCoordinate2D(latitude: 51.5359142, longitude: -0.0699125), __C.CLLocationCoordinate2D(latitude: 51.54207, longitude: -0.0589354), __C.CLLocationCoordinate2D(latitude: 51.5466802, longitude: -0.0473953), __C.CLLocationCoordinate2D(latitude: 51.5450845, longitude: -0.0342933), __C.CLLocationCoordinate2D(latitude: 51.5350628, longitude: -0.047699), __C.CLLocationCoordinate2D(latitude: 51.5355983, longitude: -0.0625012), __C.CLLocationCoordinate2D(latitude: 51.5347772, longitude: -0.0734343), __C.CLLocationCoordinate2D(latitude: 51.5345395, longitude: -0.0775157), __C.CLLocationCoordinate2D(latitude: 51.5360529, longitude: -0.0720489), __C.CLLocationCoordinate2D(latitude: 51.5399804, longitude: -0.0595497), __C.CLLocationCoordinate2D(latitude: 51.5469355, longitude: -0.0489344), __C.CLLocationCoordinate2D(latitude: 51.545254, longitude: -0.0356375), __C.CLLocationCoordinate2D(latitude: 51.5355008, longitude: -0.0471385), __C.CLLocationCoordinate2D(latitude: 51.535366, longitude: -0.0615403), __C.CLLocationCoordinate2D(latitude: 51.5349402, longitude: -0.0725863), __C.CLLocationCoordinate2D(latitude: 51.5365266, longitude: -0.0765295), __C.CLLocationCoordinate2D(latitude: 51.538049, longitude: -0.0607072), __C.CLLocationCoordinate2D(latitude: 51.5471295, longitude: -0.0505968), __C.CLLocationCoordinate2D(latitude: 51.5452376, longitude: -0.0370383), __C.CLLocationCoordinate2D(latitude: 51.5364211, longitude: -0.0436631), __C.CLLocationCoordinate2D(latitude: 51.5343624, longitude: -0.0601782), __C.CLLocationCoordinate2D(latitude: 51.5355057, longitude: -0.0718799), __C.CLLocationCoordinate2D(latitude: 51.5367435, longitude: -0.0779583), __C.CLLocationCoordinate2D(latitude: 51.537744, longitude: -0.0608419), __C.CLLocationCoordinate2D(latitude: 51.5472737, longitude: -0.0516084), __C.CLLocationCoordinate2D(latitude: 51.5452853, longitude: -0.0409098), __C.CLLocationCoordinate2D(latitude: 51.5373594, longitude: -0.0418257), __C.CLLocationCoordinate2D(latitude: 51.5342079, longitude: -0.0585641), __C.CLLocationCoordinate2D(latitude: 51.5361286, longitude: -0.0721097), __C.CLLocationCoordinate2D(latitude: 51.5371712, longitude: -0.0812337), __C.CLLocationCoordinate2D(latitude: 51.536637, longitude: -0.0617829), __C.CLLocationCoordinate2D(latitude: 51.5472339, longitude: -0.0549193), __C.CLLocationCoordinate2D(latitude: 51.5451429, longitude: -0.0422431), __C.CLLocationCoordinate2D(latitude: 51.5411923, longitude: -0.0375056), __C.CLLocationCoordinate2D(latitude: 51.534737, longitude: -0.0566969), __C.CLLocationCoordinate2D(latitude: 51.5359338, longitude: -0.0701092), __C.CLLocationCoordinate2D(latitude: 51.5374745, longitude: -0.0818088), __C.CLLocationCoordinate2D(latitude: 51.5364247, longitude: -0.0633768), __C.CLLocationCoordinate2D(latitude: 51.5467608, longitude: -0.0551402), __C.CLLocationCoordinate2D(latitude: 51.5448859, longitude: -0.0451618), __C.CLLocationCoordinate2D(latitude: 51.5413691, longitude: -0.0372165), __C.CLLocationCoordinate2D(latitude: 51.5352509, longitude: -0.0540757), __C.CLLocationCoordinate2D(latitude: 51.5357631, longitude: -0.0677825), __C.CLLocationCoordinate2D(latitude: 51.536518, longitude: -0.0819129), __C.CLLocationCoordinate2D(latitude: 51.5363212, longitude: -0.063729), __C.CLLocationCoordinate2D(latitude: 51.5460362, longitude: -0.0558673), __C.CLLocationCoordinate2D(latitude: 51.5449547, longitude: -0.0458483), __C.CLLocationCoordinate2D(latitude: 51.5434841, longitude: -0.034931), __C.CLLocationCoordinate2D(latitude: 51.5349862, longitude: -0.0526693), __C.CLLocationCoordinate2D(latitude: 51.5357286, longitude: -0.0647532), __C.CLLocationCoordinate2D(latitude: 51.5345311, longitude: -0.0777307), __C.CLLocationCoordinate2D(latitude: 51.5354704, longitude: -0.0802246), __C.CLLocationCoordinate2D(latitude: 51.5357212, longitude: -0.0653589), __C.CLLocationCoordinate2D(latitude: 51.5447652, longitude: -0.0569024), __C.CLLocationCoordinate2D(latitude: 51.5455685, longitude: -0.0461257), __C.CLLocationCoordinate2D(latitude: 51.5446085, longitude: -0.0330728), __C.CLLocationCoordinate2D(latitude: 51.5339314, longitude: -0.0490221), __C.CLLocationCoordinate2D(latitude: 51.5356899, longitude: -0.0636703), __C.CLLocationCoordinate2D(latitude: 51.5345142, longitude: -0.0764868), __C.CLLocationCoordinate2D(latitude: 51.5351742, longitude: -0.0796671), __C.CLLocationCoordinate2D(latitude: 51.535779, longitude: -0.0681661), __C.CLLocationCoordinate2D(latitude: 51.542776, longitude: -0.0576347), __C.CLLocationCoordinate2D(latitude: 51.5465192, longitude: -0.0474011), __C.CLLocationCoordinate2D(latitude: 51.5447942, longitude: -0.0327795), __C.CLLocationCoordinate2D(latitude: 51.5340752, longitude: -0.0487108), __C.CLLocationCoordinate2D(latitude: 51.5357051, longitude: -0.0628872), __C.CLLocationCoordinate2D(latitude: 51.5347966, longitude: -0.0736036), __C.CLLocationCoordinate2D(latitude: 51.5351838, longitude: -0.077662), __C.CLLocationCoordinate2D(latitude: 51.5360007, longitude: -0.0707067), __C.CLLocationCoordinate2D(latitude: 51.5410694, longitude: -0.0589856), __C.CLLocationCoordinate2D(latitude: 51.5467888, longitude: -0.047991), __C.CLLocationCoordinate2D(latitude: 51.5451323, longitude: -0.0346997), __C.CLLocationCoordinate2D(latitude: 51.5350185, longitude: -0.0475868), __C.CLLocationCoordinate2D(latitude: 51.5355201, longitude: -0.0619614), __C.CLLocationCoordinate2D(latitude: 51.5345882, longitude: -0.0729938), __C.CLLocationCoordinate2D(latitude: 51.5363196, longitude: -0.0745085), __C.CLLocationCoordinate2D(latitude: 51.539179, longitude: -0.0600042), __C.CLLocationCoordinate2D(latitude: 51.5471163, longitude: -0.0498235), __C.CLLocationCoordinate2D(latitude: 51.5452344, longitude: -0.0359897), __C.CLLocationCoordinate2D(latitude: 51.5357812, longitude: -0.0450346), __C.CLLocationCoordinate2D(latitude: 51.5348789, longitude: -0.0609783), __C.CLLocationCoordinate2D(latitude: 51.5350087, longitude: -0.0723478), __C.CLLocationCoordinate2D(latitude: 51.5365911, longitude: -0.0771288), __C.CLLocationCoordinate2D(latitude: 51.5378795, longitude: -0.0607853), __C.CLLocationCoordinate2D(latitude: 51.5469319, longitude: -0.0515012), __C.CLLocationCoordinate2D(latitude: 51.5452312, longitude: -0.0384016), __C.CLLocationCoordinate2D(latitude: 51.536606, longitude: -0.0432138), __C.CLLocationCoordinate2D(latitude: 51.5341991, longitude: -0.0594529), __C.CLLocationCoordinate2D(latitude: 51.5360508, longitude: -0.0719223), __C.CLLocationCoordinate2D(latitude: 51.536774, longitude: -0.0783296), __C.CLLocationCoordinate2D(latitude: 51.5376641, longitude: -0.0609719), __C.CLLocationCoordinate2D(latitude: 51.5473703, longitude: -0.0536318), __C.CLLocationCoordinate2D(latitude: 51.5452504, longitude: -0.0416006), __C.CLLocationCoordinate2D(latitude: 51.538296, longitude: -0.0406546), __C.CLLocationCoordinate2D(latitude: 51.5344347, longitude: -0.0574492), __C.CLLocationCoordinate2D(latitude: 51.536034, longitude: -0.0718659), __C.CLLocationCoordinate2D(latitude: 51.5374583, longitude: -0.0812849), __C.CLLocationCoordinate2D(latitude: 51.5366182, longitude: -0.0623217), __C.CLLocationCoordinate2D(latitude: 51.5471186, longitude: -0.0550056), __C.CLLocationCoordinate2D(latitude: 51.5451051, longitude: -0.0423832), __C.CLLocationCoordinate2D(latitude: 51.5413908, longitude: -0.0380191), __C.CLLocationCoordinate2D(latitude: 51.5351635, longitude: -0.0552192), __C.CLLocationCoordinate2D(latitude: 51.5358891, longitude: -0.0696446), __C.CLLocationCoordinate2D(latitude: 51.537336, longitude: -0.081743), __C.CLLocationCoordinate2D(latitude: 51.5363515, longitude: -0.0633435), __C.CLLocationCoordinate2D(latitude: 51.5463972, longitude: -0.0551807), __C.CLLocationCoordinate2D(latitude: 51.544889, longitude: -0.0456457), __C.CLLocationCoordinate2D(latitude: 51.5417994, longitude: -0.0377263), __C.CLLocationCoordinate2D(latitude: 51.535126, longitude: -0.0531695), __C.CLLocationCoordinate2D(latitude: 51.5357329, longitude: -0.0664924), __C.CLLocationCoordinate2D(latitude: 51.5357723, longitude: -0.0820255), __C.CLLocationCoordinate2D(latitude: 51.5357763, longitude: -0.0644108), __C.CLLocationCoordinate2D(latitude: 51.5456657, longitude: -0.0566835), __C.CLLocationCoordinate2D(latitude: 51.5450363, longitude: -0.0459522), __C.CLLocationCoordinate2D(latitude: 51.5443939, longitude: -0.0336376), __C.CLLocationCoordinate2D(latitude: 51.5350829, longitude: -0.0523708), __C.CLLocationCoordinate2D(latitude: 51.5357105, longitude: -0.0640826), __C.CLLocationCoordinate2D(latitude: 51.5345354, longitude: -0.077107), __C.CLLocationCoordinate2D(latitude: 51.5350263, longitude: -0.0799515), __C.CLLocationCoordinate2D(latitude: 51.5357344, longitude: -0.0666072), __C.CLLocationCoordinate2D(latitude: 51.5446827, longitude: -0.0561269), __C.CLLocationCoordinate2D(latitude: 51.5461838, longitude: -0.0470815), __C.CLLocationCoordinate2D(latitude: 51.544657, longitude: -0.0328338), __C.CLLocationCoordinate2D(latitude: 51.5340356, longitude: -0.0488388), __C.CLLocationCoordinate2D(latitude: 51.5357117, longitude: -0.0633812), __C.CLLocationCoordinate2D(latitude: 51.5345417, longitude: -0.0755842), __C.CLLocationCoordinate2D(latitude: 51.5353452, longitude: -0.0787288), __C.CLLocationCoordinate2D(latitude: 51.5359073, longitude: -0.0698067), __C.CLLocationCoordinate2D(latitude: 51.5419207, longitude: -0.058244), __C.CLLocationCoordinate2D(latitude: 51.5466549, longitude: -0.0473029), __C.CLLocationCoordinate2D(latitude: 51.544969, longitude: -0.0334605), __C.CLLocationCoordinate2D(latitude: 51.5350332, longitude: -0.047728), __C.CLLocationCoordinate2D(latitude: 51.5356045, longitude: -0.0625297), __C.CLLocationCoordinate2D(latitude: 51.5348198, longitude: -0.0734521), __C.CLLocationCoordinate2D(latitude: 51.5348426, longitude: -0.0774964), __C.CLLocationCoordinate2D(latitude: 51.5360457, longitude: -0.0719992), __C.CLLocationCoordinate2D(latitude: 51.5400865, longitude: -0.0594839), __C.CLLocationCoordinate2D(latitude: 51.5468685, longitude: -0.0486995), __C.CLLocationCoordinate2D(latitude: 51.5452809, longitude: -0.0356042), __C.CLLocationCoordinate2D(latitude: 51.5351368, longitude: -0.0474724), __C.CLLocationCoordinate2D(latitude: 51.535441, longitude: -0.0616775), __C.CLLocationCoordinate2D(latitude: 51.5349248, longitude: -0.0727475), __C.CLLocationCoordinate2D(latitude: 51.5364439, longitude: -0.0758078), __C.CLLocationCoordinate2D(latitude: 51.5384259, longitude: -0.0604899), __C.CLLocationCoordinate2D(latitude: 51.5471447, longitude: -0.0504475), __C.CLLocationCoordinate2D(latitude: 51.5452367, longitude: -0.0369856), __C.CLLocationCoordinate2D(latitude: 51.5364906, longitude: -0.0435747), __C.CLLocationCoordinate2D(latitude: 51.5344313, longitude: -0.0603434), __C.CLLocationCoordinate2D(latitude: 51.5354559, longitude: -0.0718685), __C.CLLocationCoordinate2D(latitude: 51.5367301, longitude: -0.0779279), __C.CLLocationCoordinate2D(latitude: 51.537757, longitude: -0.060813), __C.CLLocationCoordinate2D(latitude: 51.5472343, longitude: -0.0516026), __C.CLLocationCoordinate2D(latitude: 51.5452833, longitude: -0.0406354), __C.CLLocationCoordinate2D(latitude: 51.5370077, longitude: -0.0424958), __C.CLLocationCoordinate2D(latitude: 51.5342071, longitude: -0.0586458), __C.CLLocationCoordinate2D(latitude: 51.5361382, longitude: -0.0721996), __C.CLLocationCoordinate2D(latitude: 51.5370402, longitude: -0.0802275), __C.CLLocationCoordinate2D(latitude: 51.5366888, longitude: -0.0617498), __C.CLLocationCoordinate2D(latitude: 51.5472058, longitude: -0.0547385), __C.CLLocationCoordinate2D(latitude: 51.5451589, longitude: -0.0421188), __C.CLLocationCoordinate2D(latitude: 51.54115, longitude: -0.0375249), __C.CLLocationCoordinate2D(latitude: 51.5346756, longitude: -0.0568645), __C.CLLocationCoordinate2D(latitude: 51.5359546, longitude: -0.070295), __C.CLLocationCoordinate2D(latitude: 51.5374725, longitude: -0.081773), __C.CLLocationCoordinate2D(latitude: 51.5365713, longitude: -0.0633869), __C.CLLocationCoordinate2D(latitude: 51.5467793, longitude: -0.055137), __C.CLLocationCoordinate2D(latitude: 51.5448879, longitude: -0.0449147), __C.CLLocationCoordinate2D(latitude: 51.5413197, longitude: -0.0372919), __C.CLLocationCoordinate2D(latitude: 51.535249, longitude: -0.0542661), __C.CLLocationCoordinate2D(latitude: 51.5357698, longitude: -0.0679836), __C.CLLocationCoordinate2D(latitude: 51.5365666, longitude: -0.0819054), __C.CLLocationCoordinate2D(latitude: 51.536335, longitude: -0.0637042), __C.CLLocationCoordinate2D(latitude: 51.5463561, longitude: -0.0557523), __C.CLLocationCoordinate2D(latitude: 51.5449121, longitude: -0.045813), __C.CLLocationCoordinate2D(latitude: 51.5430927, longitude: -0.0357785), __C.CLLocationCoordinate2D(latitude: 51.5349955, longitude: -0.0526971), __C.CLLocationCoordinate2D(latitude: 51.5357248, longitude: -0.0649893), __C.CLLocationCoordinate2D(latitude: 51.5344949, longitude: -0.0782042), __C.CLLocationCoordinate2D(latitude: 51.535475, longitude: -0.0803531), __C.CLLocationCoordinate2D(latitude: 51.5357248, longitude: -0.0649893), __C.CLLocationCoordinate2D(latitude: 51.5453904, longitude: -0.0568637), __C.CLLocationCoordinate2D(latitude: 51.5455048, longitude: -0.046079), __C.CLLocationCoordinate2D(latitude: 51.5446789, longitude: -0.0330769), __C.CLLocationCoordinate2D(latitude: 51.5342005, longitude: -0.0499021), __C.CLLocationCoordinate2D(latitude: 51.535686, longitude: -0.0638389), __C.CLLocationCoordinate2D(latitude: 51.5345192, longitude: -0.0767115), __C.CLLocationCoordinate2D(latitude: 51.5351565, longitude: -0.0796598), __C.CLLocationCoordinate2D(latitude: 51.5357698, longitude: -0.0679836), __C.CLLocationCoordinate2D(latitude: 51.5428556, longitude: -0.0575568), __C.CLLocationCoordinate2D(latitude: 51.546474, longitude: -0.047449), __C.CLLocationCoordinate2D(latitude: 51.5447548, longitude: -0.0327854), __C.CLLocationCoordinate2D(latitude: 51.5340704, longitude: -0.0487321), __C.CLLocationCoordinate2D(latitude: 51.5357194, longitude: -0.0629788), __C.CLLocationCoordinate2D(latitude: 51.5346536, longitude: -0.0745348), __C.CLLocationCoordinate2D(latitude: 51.5351544, longitude: -0.0782645), __C.CLLocationCoordinate2D(latitude: 51.5359546, longitude: -0.070295), __C.CLLocationCoordinate2D(latitude: 51.5411063, longitude: -0.0589804), __C.CLLocationCoordinate2D(latitude: 51.546729, longitude: -0.0479981), __C.CLLocationCoordinate2D(latitude: 51.545139, longitude: -0.0345173), __C.CLLocationCoordinate2D(latitude: 51.5350261, longitude: -0.0476061), __C.CLLocationCoordinate2D(latitude: 51.5355272, longitude: -0.0620218), __C.CLLocationCoordinate2D(latitude: 51.5346074, longitude: -0.0731302)]

Here is the request URL in this case, interesting but doesn't generate the points for some reason into the URL, nor the settings. Why could that happen?

https://api.mapbox.com/matching/v5/mapbox/cycling?access_token=***

And then this is the error coming back:

Error matching coordinates: unknown(response: Optional(<NSHTTPURLResponse: 0x60000394a7a0> { URL: https://api.mapbox.com/matching/v5/mapbox/cycling?access_token=*** } { Status Code: 504, Headers {
    Connection =     (
        "keep-alive"
    );
    "Content-Length" =     (
        1033
    );
    "Content-Type" =     (
        "text/html"
    );
    Date =     (
        "Wed, 24 Mar 2021 13:28:52 GMT"
    );
    Server =     (
        CloudFront
    );
    Via =     (
        "1.1 4e4c50c641418e6aad9ec09cb0f22845.cloudfront.net (CloudFront)"
    );
    "X-Amz-Cf-Id" =     (
        "SkSmVMJ8hkvqcDiUO6V4kQEdoNqjsogo_WwLh0NOdiI7XUfAsrxWzA=="
    );
    "X-Amz-Cf-Pop" =     (
        "AMS54-C1"
    );
    "X-Cache" =     (
        "Error from cloudfront"
    );
} }), underlying: nil, code: nil, message: nil)

Now it's unknown, but sometimes I receive back NoMatching

csongorkeller avatar Mar 24 '21 13:03 csongorkeller

Reopening per @csongorkeller's request via email.

andrewbrownnz avatar Apr 06 '21 03:04 andrewbrownnz

Here is the request URL in this case, interesting but doesn't generate the points for some reason into the URL, nor the settings. Why could that happen?

The Map Matching API uses POST requests, not GET requests, so the coordinates and every parameter except access_token is in the request’s httpBody. If you’re relying on Directions.url(forCalculating:), use urlRequest(forCalculating:) instead.

1ec5 avatar Apr 06 '21 23:04 1ec5

@1ec5 We are using POST requests and the urlRequest(forCalculating:) method. From the sample request posted above can you say the response contains sub-matches?

jackgregory avatar Apr 12 '21 23:04 jackgregory

Look at the raw JSON-formatted response from that URL – not processed by the MapboxDirections library in Swift. If submatches is the issue, you’d see multiple items in the matches array, and none of them would include all the waypoints.

1ec5 avatar Apr 20 '21 18:04 1ec5