Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Placemark initializer #202

Merged
merged 2 commits into from
Dec 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
command: xcodebuild -project MapboxGeocoder.xcodeproj -scheme 'MapboxGeocoder Mac' clean build<<# parameters.test >> test <</ parameters.test >><<# parameters.codecoverage >>-enableCodeCoverage YES<</ parameters.codecoverage >>
- run:
name: watchOS
command: xcodebuild -project MapboxGeocoder.xcodeproj -scheme 'MapboxGeocoder watchOS' -destination 'platform=watchOS Simulator,name=Apple Watch Series 3 - 42mm,OS=<< parameters.watchOS >>' clean build
command: xcodebuild -project MapboxGeocoder.xcodeproj -scheme 'MapboxGeocoder watchOS' -destination 'platform=watchOS Simulator,name=Apple Watch Series 4 - 44mm,OS=<< parameters.watchOS >>' clean build

workflows:
workflow:
Expand All @@ -101,8 +101,9 @@ workflows:
watchOS: "5.2"
codecoverage: true
- build-job:
name: "Xcode_10.2_iOS_9"
xcode: "10.2.0"
iOS: "9.3"
tvOS: "12.2"
watchOS: "5.2"
name: "Xcode_11.3_iOS_13"
xcode: "11.3.0"
device: "iPhone 8 Plus"
iOS: "13.3"
tvOS: "13.3"
watchOS: "6.1.1"
13 changes: 13 additions & 0 deletions MapboxGeocoder/MBPlacemark.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@ open class Placemark: NSObject, Codable {
case boundingBox = "bbox"
}

/**
Creates a placemark with the given name and identifier.

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.

- parameter identifier: A string that uniquely identifies the feature.
- parameter name: The common name of the placemark.
*/
@objc public init(identifier: String, name: String) {
self.identifier = identifier
self.name = name
}

/**
Creates a placemark from the given [Carmen GeoJSON](/~https://github.com/mapbox/carmen/blob/master/carmen-geojson.md) feature.
*/
Expand Down