Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CLGeocoder.PlacemarkValue
Queries a value of the placemarks found.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CLGeocoder | 4.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
MBS( "CLGeocoder.PlacemarkValue"; Geocoder; Index; Selector { ; otherLatitude; otherLongitude } ) More
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-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
Release notes
- Version 9.0
- Improved out of bounds error message for Menu.InsertItem, Menu.RemoveItemAtIndex, Calendar.Item.GetAttendeeURL, Calendar.Item.GetAttendeeCommonName, Calendar.Item.GetAttendeeStatus, Printer.PrinterName and CLGeocoder.PlacemarkValue.
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
This function checks for a license.
Created 18th August 2014, last changed 8th February 2024
CLGeocoder.PlacemarkCount - CLGeocoder.ReverseGeocodeLocation