-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Labels
Description
Placemark.scope
is computed by parsing the feature identifier, but this means a placemark can have only one scope. In fact, a Geocoding API result can have multiple scopes, but the remaining scopes are encoded in the place_type
property.
MapboxGeocoder.swift/MapboxGeocoder/MBPlacemark.swift
Lines 184 to 188 in ffb6c13
@objc open var scope: PlacemarkScope { | |
let components = identifier.components(separatedBy: ".") | |
assert(components.count > 0) | |
return PlacemarkScope(descriptions: [components.prefix(2).joined(separator: ".")]) ?? PlacemarkScope(descriptions: [components.first!]) ?? [] | |
} |
/ref mapbox/mapbox-java#512
/cc @frederoni @samfader