CLGeocoder.PlacemarkValue
-------------------------

Queries a value of the placemarks found.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CLGeocoder](component_CLGeocoder.md) | [4.1](newinversion41.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "CLGeocoder.PlacemarkValue"; Geocoder; Index; Selector { ; otherLatitude; otherLongitude } ) 

**MBS**( **"CLGeocoder.PlacemarkValue";** /\* Queries a value of the placemarks found. \*/  
**$Geocoder**; /\* The reference number of the geocoder instance. \*/   
**$Index**; /\* The index of the placemark. From 0 to [CLGeocoder.PlacemarkCount](CLGeocoderPlacemarkCount.md)-1.e.g. 0 \*/   
**$Selector**; /\* Which property to return.e.g. "Name" \*/   
**$otherLatitude**; /\* Optional; For distance calculation the latitude of the other place.e.g. $lat \*/   
**$otherLongitude**) /\* Optional; For distance calculation the longitude of the other place.e.g. $lon \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Geocoder | The reference number of the geocoder instance. | $Geocoder |  |
| Index | The index of the placemark. From 0 to [CLGeocoder.PlacemarkCount](CLGeocoderPlacemarkCount.md)-1. | 0 |  |
| Selector | Which property to return. | "Name" |  |
| otherLatitude | For distance calculation the latitude of the other place. | $lat | Optional |
| otherLongitude | For distance calculation the longitude of the other place. | $lon | Optional |

### Result

Returns value or error.

### Description

Queries a value of the placemarks found.  
Possible values for selector:  
| name | The name of the placemark. |
|---|---|
| thoroughfare | The street address associated with the placemark. The street address contains the street name. For example, if the placemark location is Apple's headquarters, the value for this property would be the string "Infinite Loop". |
| subThoroughfare | Additional street-level information for the placemark. Subthroughfares provide information such as the street number for the location. For example, if the placemark location is Apple's headquarters (1 Infinite Loop), the value for this property would be the string "1". |
| locality | The city associated with the placemark. If the placemark location is Apple's headquarters, for example, the value for this property would be the string "Cupertino". |
| subLocality | Additional city-level information for the placemark. This property contains additional information, such as the name of the neighborhood or landmark associated with the placemark. It might also refer to a common name that is associated with the location. |
| administrativeArea | The state or province associated with the placemark. The string in this property can be either the spelled out name of the administrative area or its designated abbreviation, if one exists. If the placemark location is Apple's headquarters, for example, the value for this property would be the string "CA" or "California". |
| subAdministrativeArea | Additional administrative area information for the placemark. Subadministrative areas typically correspond to counties or other regions that are then organized into a larger administrative area or state. For example, if the placemark location is Apple's headquarters, the value for this property would be the string "Santa Clara", which is the county in California that contains the city of Cupertino. |
| postalCode | The postal code associated with the placemark. If the placemark location is Apple's headquarters, for example, the value for this property would be the string "95014". |
| ISOcountryCode | The abbreviated country name. This string is the standard abbreviation used to refer to the country. For example, if the placemark location is Apple's headquarters, the value for this property would be the string "US". |
| country | The name of the country associated with the placemark. f the placemark location is Apple's headquarters, for example, the value for this property would be the string "United States". |
| inlandWater | The name of the inland water body associated with the placemark. For coordinates that lie over an inland body of water, this property contains the name of that water body-the name of a lake, stream, river, or other waterway. |
| ocean | The name of the ocean associated with the placemark. For coordinates that lie over an ocean, this property contains the name of the ocean. |
| areasOfInterest | The relevant areas of interest associated with the placemark. Examples of an area of interest are the name of a military base or large national park or an attraction such as Eiffel Tower, Disneyland, or Golden Gate Park. This is a list of several texts. |
| region.radius | The radius of the geographic region associated with the placemark. |
| region.center.latitude | The latitude of the geographic region associated with the placemark. |
| region.center.longitude | The longitude of the geographic region associated with the placemark. |
| region.identifier | The identifier of the geographic region associated with the placemark. |
| address | The formatted address. |
| location.horizontalAccuracy | The horizontal accuracy of the location. |
| location.verticalAccuracy | The vertical accuracy of the location. |
| location.altitude | The altitude of the location. |
| location.timestamp | The timestamp of the location. |
| location.description | The description text of the location. |
| location.latitude | The latitude of the location. |
| location.longitude | The longitude of the location. |
| distance | Calculates the distance t another location. Please provide the other place with additional parameters. Returns value in meters. |

### Examples

Query name of the first placemark:

 $name = MBS ("CLGeocoder.PlacemarkValue"; $g ; 0; "name")  
Queries the coordinates of the placemark:

 $latitude = MBS ("CLGeocoder.PlacemarkValue"; $g ; 0; "location.latitude")  
$longitude = MBS ("CLGeocoder.PlacemarkValue"; $g ; 0; "location.longitude")  
Queries distance to New York:

 $distance = MBS ("CLGeocoder.PlacemarkValue"; $g ; 0; "distance"; 40,712778; -74,005833)  
### See also

- [CLGeocoder.PlacemarkCount](CLGeocoderPlacemarkCount.md)

### Release notes

- **Version 9.0**
    - Improved out of bounds error message for [Menu.InsertItem](http://www.mbsplugins.eu/MenuInsertItem.shtml), [Menu.RemoveItemAtIndex](http://www.mbsplugins.eu/MenuRemoveItemAtIndex.shtml), [Calendar.Item.GetAttendeeURL](http://www.mbsplugins.eu/CalendarItemGetAttendeeURL.shtml), [Calendar.Item.GetAttendeeCommonName](http://www.mbsplugins.eu/CalendarItemGetAttendeeCommonName.shtml), [Calendar.Item.GetAttendeeStatus](http://www.mbsplugins.eu/CalendarItemGetAttendeeStatus.shtml), [Printer.PrinterName](http://www.mbsplugins.eu/PrinterPrinterName.shtml) and [CLGeocoder.PlacemarkValue](http://www.mbsplugins.eu/CLGeocoderPlacemarkValue.shtml).

### Example Databases

- [Mac and iOS/CoreLocation/Address Mapping](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/CoreLocation/Address%20Mapping.shtml#1ScriptAnchor_)
- [Mac and iOS/CoreLocation/CLGeocoder](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/CoreLocation/CLGeocoder.shtml#3ScriptAnchor_)
- [Mac and iOS/MapKit/MapView BeeExample](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/MapKit/MapView%20BeeExample.shtml#16ScriptAnchor_)
- [Mac and iOS/MapKit/Validate Address](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/MapKit/Validate%20Address.shtml#1ScriptAnchor_)

### Blog Entries

- [Use MapKit to validate addresses](https://www.mbsplugins.de/archive/2024-02-15/Use_MapKit_to_validate_address/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 8.6pr2](https://www.mbsplugins.de/archive/2018-12-05/MBS_FileMaker_Plugin_version_8/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 2nd December 2025

  
[CLGeocoder.PlacemarkCount](CLGeocoderPlacemarkCount.md) - [CLGeocoder.ReverseGeocodeLocation](CLGeocoderReverseGeocodeLocation.md)

[HTML Version](CLGeocoderPlacemarkValue.shtml)