[core] Use geometry.hpp feature type

This commit is contained in:
John Firebaugh
2016-04-29 18:28:34 -07:00
parent 01b3eac52f
commit c8391729c7
37 changed files with 283 additions and 82 deletions

View File

@@ -722,14 +722,14 @@ std::vector<TileCoordinate> pointsToCoordinates(const std::vector<ScreenCoordina
return queryGeometry;
}
std::vector<std::string> Map::queryRenderedFeatures(const ScreenCoordinate& point, const optional<std::vector<std::string>>& layerIDs) {
std::vector<Feature> Map::queryRenderedFeatures(const ScreenCoordinate& point, const optional<std::vector<std::string>>& layerIDs) {
if (!impl->style) return {};
auto queryGeometry = pointsToCoordinates({ point }, impl->transform.getState());
return impl->style->queryRenderedFeatures(queryGeometry, impl->transform.getZoom(), impl->transform.getAngle(), layerIDs);
}
std::vector<std::string> Map::queryRenderedFeatures(const std::array<ScreenCoordinate, 2>& box, const optional<std::vector<std::string>>& layerIDs) {
std::vector<Feature> Map::queryRenderedFeatures(const std::array<ScreenCoordinate, 2>& box, const optional<std::vector<std::string>>& layerIDs) {
if (!impl->style) return {};
std::vector<ScreenCoordinate> queryPoints {