mapbox / MapboxGeocoder.swift

Address search and reverse geocoding in Swift or Objective-C on iOS, macOS, tvOS, and watchOS
https://www.mapbox.com/geocoding/
ISC License
131 stars 48 forks source link

Enumerate categories #119

Open 1ec5 opened 6 years ago

1ec5 commented 6 years ago

The Geocoding API has introduced experimental support for category search, which is analogous to MapKit’s MKLocalSearch/MKLocalSearchRequest API. The Geocoding API doesn’t currently support natural language queries; instead, you specify one of a number of predefined keywords as the query and pointOfInterest as the scope (and typically a focalLocation). An application can present the user with a series of buttons for common categories to search for, similar to the one in Apple’s Maps application.

Category search currently works without any modifications to this library. However, we can improve the feature’s discoverability by providing an enumeration of the supported categories. Since the set of categories is open-ended and subject to change, it’ll need to be an extensible string enumeration, similar to the profile identifiers exposed by MapboxDirections.swift. We should mark this enumeration with the - experimental documentation command until the “Preview” tag is removed from the API documentation.

/cc @frederoni @bsudekum

1ec5 commented 6 years ago

mapbox/mapbox-java#582 is the equivalent issue for the Android and Java SE platforms.

1ec5 commented 6 years ago

https://github.com/mapbox/mapbox-java/issues/582#issuecomment-350839494 points out that there are a ton of possible values, which may make it impractical to provide constants for each value. How else would be we improve the discoverability of this feature?