Platforms to show: All Mac Windows Linux Cross-Platform

MKMapPointMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class MapKit MBS MacFrameworks Plugin 19.0 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The class for a point on the map.
Example
// take some coordinates
Var c1 as new CLLocationCoordinate2DMBS(52.518611, 13.408333) // Berlin
Var c2 as new CLLocationCoordinate2DMBS(48.137222, 11.575556) // Munich

// convert to points on map
Var p1 as MKMapPointMBS = MKMapPointMBS.Point(c1)
Var p2 as MKMapPointMBS = MKMapPointMBS.Point(c2)

// show
MsgBox p1.StringValue+EndOfLine+p2.StringValue

// create locations
Var l1 as new CLLocationMBS(c1.latitude, c1.longitude)
Var l2 as new CLLocationMBS(c2.latitude, c2.longitude)

// show
MsgBox l1.Description+EndOfLine+l2.Description

// now get distance on two ways
Var d1 as Double = MKMapPointMBS.MetersBetweenMapPoints(p1,p2)
Var d2 as Double = l1.distanceFromLocation(l2)

// and format to show
Var s1 as string = MKDistanceFormatterMBS.formatter.stringFromDistance(d1)
Var s2 as string = MKDistanceFormatterMBS.formatter.stringFromDistance(d2)

MsgBox "Distance: "+s1+" vs. "+s2
// not the same due to rounding!

This class has no sub classes.

Blog Entries

Xojo Developer Magazine

Some methods using this class:

Some properties using for this class:

Some related classes:


The items on this page are in the following plugins: MBS MacFrameworks Plugin.


MKMapItemMBS   -   MKMapRectMBS


The biggest plugin in space...