Skip to content

Commit 9615e98

Browse files
committed
Added Placemark initializer
1 parent c8cf41e commit 9615e98

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

MapboxGeocoder/MBPlacemark.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,19 @@ open class Placemark: NSObject, Codable {
8080
case boundingBox = "bbox"
8181
}
8282

83+
/**
84+
Creates a placemark with the given name and identifier.
85+
86+
Normally you do not call this method to obtain a placemark. Instead, you call the `Geocoder.geocode(_:completionHandler:)` method, which asynchronously returns placemarks that match certain criteria.
87+
88+
- parameter identifier: A string that uniquely identifies the feature.
89+
- parameter name: The common name of the placemark.
90+
*/
91+
@objc public init(identifier: String, name: String) {
92+
self.identifier = identifier
93+
self.name = name
94+
}
95+
8396
/**
8497
Creates a placemark from the given [Carmen GeoJSON](https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) feature.
8598
*/

0 commit comments

Comments
 (0)