Platforms to show: All Mac Windows Linux Cross-Platform
Back to MKDirectionsMBS class.
MKDirectionsMBS.calculateDirections(tag as variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Calls calculateDirectionsCompleted event later.
This method initiates the request for directions and calls your calculateDirectionsCompleted event with the results. The implementation of your event handler should check for errors and then incorporate the response data as appropriate.
If you call this method while a previous request is in process, this method calls your event with an error. You can determine if a request is in process by checking the value of the calculating property. You can also cancel a request as needed.
Some examples using this method:
MKDirectionsMBS.calculateETA(tag as variant = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
This method initiates a request for a travel-time estimate and calls your calculateETAWithCompleted event handler block with the results. Travel-time estimates take much less time to generate than directions, so use this method in situations where you want a time estimate only. The implementation of your handler should check for errors and then incorporate the response data as appropriate.
If you call this method while a previous request is in process, this method calls your event handler with an error. You can determine if a request is in process by checking the value of the calculating property. You can also cancel a request as needed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
After canceling a request, you can call the calculateDirections method again (if you want) to restart the request process.
MKDirectionsMBS.Constructor(Handle as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 21.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Useful if you get a MKDirections reference from a declare.
The object is retained.
See also:
MKDirectionsMBS.Constructor(request as MKDirectionsRequestMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
request: The request object containing the start and end points of the route. This parameter must not be nil.
After initializing your directions object, you must call the calculateDirections or calculateETA method to perform the request.
See also:
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
The items on this page are in the following plugins: MBS MacFrameworks Plugin.