Xojo Conferences
MBSOct2019CologneDE

Platforms to show: All Mac Windows Linux Cross-Platform

MKMapPointMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class MapKit MBS MacFrameworks Plugin 19.0 Yes No No Yes, macOS only No
Function: The class for a point on the map.
Example:
// take some coordinates
dim c1 as new CLLocationCoordinate2DMBS(52.518611, 13.408333) // Berlin
dim c2 as new CLLocationCoordinate2DMBS(48.137222, 11.575556) // Munich

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

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

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

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

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

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

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

Feedback, Comments & Corrections

This class has no sub classes.

Some methods using this class:

Some properties using for this class:


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


MKMapItemMBS   -   MKMapRectMBS

The biggest plugin in space...




Links
MBS Xojo Chart Plugins