Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Recently a client asked if we could help on entering addresses. Like to fix typos, lookup zip codes or split addresses into fields like for street name, house number and city. We got an idea and made a new sample file for you to validate address with MapKit.

MapKitValidate.jpg

We use the CLGeocoder functions to geocode the address. Once done, we can inspect the result and query the various parts of the response. This includes the thoroughfare (aka street) and the subThoroughfare (house number). We can then fill the fields in our database and get the address from the user parsed.

 

Here is the sample script form our sample file included with MBS FileMaker Plugin in v14.1 or newer:

Set Variable [ $geocoder ; Value: MBS( "CLGeocoder.GeocodeAddressString"; Validate Address::Input; 1) ] 
If [ MBS("IsError") ] 
	Show Custom Dialog [ "Failed to locate address" ; $geocoder ] 
Else If [ MBS( "CLGeocoder.PlacemarkCount"; $Geocoder ) = 0 ] 
	Show Custom Dialog [ "No place found." ] 
Else
	Set Variable [ $streetNumber ; Value: MBS( "CLGeocoder.PlacemarkValue"; $Geocoder; 0; "subThoroughfare") ] 
	Set Field [ Validate Address::Address ; MBS( "CLGeocoder.PlacemarkValue"; $Geocoder; 0; "Address") ] 
	Set Field [ Validate Address::PostalCode ; MBS( "CLGeocoder.PlacemarkValue"; $Geocoder; 0; "postalCode") ] 
	Set Field [ Validate Address::City ; MBS( "CLGeocoder.PlacemarkValue"; $Geocoder; 0; "locality") ] 
	Set Field [ Validate Address::Street ; MBS( "CLGeocoder.PlacemarkValue"; $Geocoder; 0; "thoroughfare") & If ( Length ( $streetNumber ) > 0; " " & $streetNumber; "" ) ] 
	Set Field [ Validate Address::Country ; MBS( "CLGeocoder.PlacemarkValue"; $Geocoder; 0; "Country") ] 
	Set Field [ Validate Address::JSON ; MBS("JSON.Colorize"; MBS( "CLGeocoder.JSON"; $Geocoder)) ] 
End If
Set Variable [ $r ; Value: MBS( "CLGeocoder.Close"; $Geocoder ) ] 

Please try and let us know how well it works.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.