Platforms to show: All Mac Windows Linux Cross-Platform
CLGeocoderMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | CoreLocation | MBS MacFrameworks Plugin | 12.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
A user-friendly representation of the coordinate typically consists of the street, city, state, and country information corresponding to the given location, but it may also contain a relevant point of interest, landmarks, or other identifying information. A geocoder object is a single-shot object that works with a network-based service to look up placemark information for its specified coordinate value.
To use a geocoder object, create it and call one of its forward- or reverse-geocoding methods to begin the request. Reverse-geocoding requests take a latitude and longitude value and find a user-readable address. Forward-geocoding requests take a user-readable address and find the corresponding latitude and longitude value. Forward-geocoding requests may also return additional information about the specified location, such as a point of interest or building at that location. For both types of request, the results are returned using a CLPlacemark object. In the case of forward-geocoding requests, multiple placemark objects may be returned if the provided information yielded multiple possible locations.
To make smart decisions about what types of information to return, the geocoder server uses all the information provided to it when processing the request. For example, if the user is moving quickly along a highway, it might return the name of the overall region, and not the name of a small park that the user is passing through.
Applications should be conscious of how they use geocoding. Here are some rules of thumb for using this class effectively:
Send at most one geocoding request for any one user action.
If the user performs multiple actions that involve geocoding the same location, reuse the results from the initial geocoding request instead of starting individual requests for each action.
When you want to update the user's current location automatically (such as when the user is moving), issue new geocoding requests only when the user has moved a significant distance and after a reasonable amount of time has passed. For example, in a typical situation, you should not send more than one geocoding request per minute.
Do not start a geocoding request at a time when the user will not see the results immediately. For example, do not start a request if your application is inactive or in the background.
The computer or device must have access to the network in order for the geocoder object to return detailed placemark information. Although, the geocoder stores enough information locally to report the localized country name and ISO country code for many locations. If country information is not available for a specific location, the geocoder may still report an error to your completion block.
see also
https://developer.apple.com/library/mac/#documentation/CoreLocation/Reference/CLGeocoder_class/Reference/Reference.html
- property Handle as Integer
- 11 methods
- method cancelGeocode
- method Constructor
- method geocodeAddressDictionary(addressDictionary as Dictionary, completionHandler as CLGeocodeCompletionHandlerMBS, tag as Variant = nil)
- method geocodeAddressString(addressString as string, completionHandler as CLGeocodeCompletionHandlerMBS, tag as Variant = nil)
- method geocodeAddressString(addressString as string, region as CLRegionMBS, completionHandler as CLGeocodeCompletionHandlerMBS, tag as Variant = nil)
- method geocodeAddressString(addressString as string, region as CLRegionMBS, preferredLocale as NSLocaleMBS, completionHandler as CLGeocodeCompletionHandlerMBS, tag as variant = nil)
- method geocodePostalAddress(postalAddress as Variant, completionHandler as CLGeocodeCompletionHandlerMBS, tag as variant = nil)
- method geocodePostalAddress(postalAddress as Variant, preferredLocale as NSLocaleMBS, completionHandler as CLGeocodeCompletionHandlerMBS, tag as variant = nil)
- method isGeocoding as boolean
- method reverseGeocodeLocation(location as CLLocationMBS, completionHandler as CLGeocodeCompletionHandlerMBS, tag as Variant = nil)
- method reverseGeocodeLocation(location as CLLocationMBS, preferredLocale as NSLocaleMBS, completionHandler as CLGeocodeCompletionHandlerMBS, tag as variant = nil)
- shared method Available as boolean
This class has no sub classes.
Some events using this class:
- CLGeocodeCompletionHandlerMBS.Completed(geocoder as CLGeocoderMBS, placemarks() as CLPlacemarkMBS, error as NSErrorMBS, tag as Variant)
Some examples using this class:
- /MacFrameworks/CoreLocation/Locate Address
- /MacFrameworks/CoreLocation/Locate Address Web
- /MacFrameworks/GeoCoder
- /MacFrameworks/MapKit/MapKit Custom Icons example
- /MacFrameworks/MapKit/MapKit Custom Image
- /MacFrameworks/MapKit/MapKit Test
Blog Entries
- MBS Xojo / Real Studio Plugins, version 14.2pr1
- MonkeyBread Software Releases the MBS Real Studio plug-ins in version 12.3
- CoreLocation GeoCoder in Real Studio
Xojo Developer Magazine
- 22.2, page 69: Find Yourself, How to determine the location of devices with MBS under Windows and Mac by Stefanie Juchmes-Simonis
- 18.6, pages 70 to 71: MapKit Part 7, Implementing Maps in Xojo desktop apps with the MapKitMBS plugin by Markus Winter
- 10.6, page 9: News
Videos
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
CLGeocodeCompletionHandlerMBS - CLHeadingMBS