MapboxGeocoder.swift icon indicating copy to clipboard operation
MapboxGeocoder.swift copied to clipboard

Enumerate categories

Open 1ec5 opened this issue 8 years ago • 2 comments

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 avatar Oct 05 '17 01:10 1ec5

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

1ec5 avatar Oct 05 '17 01:10 1ec5

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?

1ec5 avatar Dec 12 '17 03:12 1ec5