Platforms to show: All Mac Windows Linux Cross-Platform
MKDistanceFormatterMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | MapKit | MBS MacFrameworks Plugin | 19.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
You use a distance formatter when you need to display distances to the user or when you want to parse user-specified text to obtain a numerical value for a distance. When formatting strings containing distances, a distance formatter object takes into account the user’s locale and language settings. You can also specify a custom locale or custom units for any distances that you format.
- 4 properties
- property Handle as Integer
- property Locale as NSLocaleMBS
- property Units as Integer
- property UnitStyle as Integer
- 4 methods
- method Constructor
- method Constructor(Handle as Integer)
- method distanceFromString(distance as String) as Double
- method stringFromDistance(distance as Double) as String
- shared method formatter as MKDistanceFormatterMBS
- 7 constants
Units
Constant | Value | Description |
---|---|---|
UnitsDefault | 0 |
The format uses the locale information to determine which units to use. Some locales mix metric and imperial units so do not assume this means one or the other. |
UnitsImperial | 2 |
The format uses imperial units. |
UnitsImperialWithYards | 3 |
The format uses imperial units that include measurements in yards. |
UnitsMetric | 1 |
The format uses metric units. |
Util Styles
Constant | Value | Description |
---|---|---|
UnitStyleAbbreviated | 1 |
Use abbreviated units. For example, use the abbreviation km instead of kilometer. |
UnitStyleDefault | 0 |
The decision to abbreviate is based on the current locale and user language settings. |
UnitStyleFull | 2 |
Spell out units in full. For example, use kilometer instead of the abbreviation km. |
This class has no sub classes.
Blog Entries
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
MKDirectionsResponseMBS - MKETAResponseMBS