Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CLGeocoder.GeocodeAddressString
Submits a forward-geocoding request using the specified string.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CLGeocoder | 4.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
MBS( "CLGeocoder.GeocodeAddressString"; Address { ; Wait } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
Address | A string describing the location you want to look up. For example, you could specify the string "1 Infinite Loop, Cupertino, CA"” to locate Apple headquarters. | "Andernach, Germany" | |
Wait | Available in MBS FileMaker Plugin 10.1 or newer. Pass 1 to wait for geocoder to have a result. Pass 0 to not wait and check later if geocoder is done. |
1 | Optional |
Result
Returns reference number or error.
Description
Submits a forward-geocoding request using the specified string.This method submits the specified location data to the geocoding server asynchronously and returns. Your completion handler block will be executed on the main thread. After initiating a forward-geocoding request, do not attempt to initiate another forward- or reverse-geocoding request.
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 geo coder passes an error back.
You need to use CLGeocoder.Close later to free the geo coder.
Seems to not work on server as it always times out.
Examples
Geocodes an address:
$r = MBS("CLGeocoder.GeocodeAddressString"; CLGeocoder::AddressString)
Query in one let statement and return JSON or error:
Let ( [
Address = "Berlin, Germany";
// run query and wait a bit
g = MBS( "CLGeocoder.GeocodeAddressString"; Address; 1 );
e = MBS("IsError");
// query JSON if we got something
r = If (e = 0; MBS( "CLGeocoder.JSON"; g ); g);
// free resources
f = If (e = 0; MBS( "CLGeocoder.Close"; g ); 0)
]; r )
See also
Release notes
- Version 14.1
- Added timeout for CLGeocoder.GeocodeAddressString and CLGeocoder.ReverseGeocodeLocation functions.
- Version 10.1
- Added wait parameter for CLGeocoder.GeocodeAddressString or CLGeocoder.ReverseGeocodeLocation function.
Example Databases
- Mac and iOS/CoreLocation/Address Mapping
- Mac and iOS/CoreLocation/CLGeocoder
- Mac and iOS/MapKit/MapView BeeExample
- Mac and iOS/MapKit/Validate Address
Blog Entries
- MBS FileMaker Plugin, version 14.1pr5
- Use MapKit to validate addresses
- New in the MBS FileMaker Plugin 10.1
- MBS FileMaker Plugin, version 10.1pr4
- Core Location Geocoder with JSON
This function checks for a license.
Created 18th August 2014, last changed 29th February 2024
