Ah, got you now. For the benefit of others following this:
Apple strictly implements the Model-View-Controller paradigm.
Therefore Apple uses two different things: MKAnnotations and their associated MKAnnotationViews, and CLLocations (MK = MapKit, CL = CoreLocation).
CLLocation is used to get a physical address from coordinates.
MKAnnotation is any object implementing the Annotation protocol (aka interface) which means it has title, subtitle, longitude, latitude. They are used to display a location on a Map.
MKAnnotationView determines how an MKAnnotation is displayed on the map (for example whether it is a pin or an icon - the default is a red pin though user defined locations should be purple pins).
Note: MKAnnotations are ‘cheap’ objects (just two strings and two doubles), MKAnnotationViews are ‘expensive’ objects (so if you can you reuse MKAnnotationViews)
So in Swift to display your data on the map you would not use CLLocation (what is the point as you already have the coordinates) but create an MKAnnotation (you can define custom classes, eg DriverAnnotation or CarAnnotation) with the coordinates you have and add that annotation to the map.
In the ViewForAnnotation you reuse a suitable view if it already exists (eg there is already a previous CarAnnotationVIew for the CarAnnotation available that you can use) or create a new one if necessary.
So to display one of your data points on a Map with Swift does not require a call to the Apple servers for the address.
That is also what the MBS MapKit implements.
Xojo does NOT follow the Model-View-Controller paradigm. It basically has bundled CLLocation, MKAnnotation, and MKAnnotationView into ONE object: MapLocation.
Which seemingly automatically does a CLLocation search for EVERY MapLocation it creates.
For Xojo’s non-professional target audience that is probably the right thing to do (even though it severely restricts what they can do, somewhat cementing Xojo’s reputation as a toy language) - but they should warn them that if they try to display 50+ locations at once (eg ‘all my company’s cars in New York’ or a runner’s GPS track with thousands of data points) the multiple searches that initiates will get throttled (eg the app ‘fails’).
Here are some tips from Apple’s documentation (Apple Developer Documentation corelocation/clgeocoder?language=swift).
Tips for Using a Geocoder Object
Apps must be conscious of how they use geocoding. Geocoding requests are rate-limited for each app, so making too many requests in a short period of time may cause some of the requests to fail. (When the maximum rate is exceeded, the geocoder returns an error object with the CLError.Code.network error to the associated completion handler). Here are some rules of thumb for using this class effectively:
- Send at most one geocoding request for any one user action.
So what are your options?
Hope that Xojo provides a MapLocation constructor without automatic lookup.
A timer is one solution but not very reliable - you might still get throttled (I would presume the map server is smart enough to allow up to 50 per second but only up to 200 per minute - it might even get you blocked completely. I guess it’s basically a defence against Denial of Service attacks).
If you have the address then you can use MKLocalSearch that does not get throttled (MBS again).
If you want more powerful and reliable then it’s MBS I’m afraid. That’s why the Pros swear on it (not that I am one).