diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-15 11:38:58 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-10-20 13:54:19 -0700 |
commit | 597b2b48511b68c7a6494386b414da479c436bd7 (patch) | |
tree | 50f22e46fc691772ec7eea2db546e9110a8e610e /src | |
parent | 8baa804a44927fe23b4fed3cb07eb6db9a78f2e8 (diff) | |
download | qtlocation-mapboxgl-597b2b48511b68c7a6494386b414da479c436bd7.tar.gz |
[core] Pull annotation typedefs to own header; add AnnotationID
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/annotation/annotation_manager.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/map/map.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mbgl/annotation/annotation_manager.hpp b/src/mbgl/annotation/annotation_manager.hpp index 248fb798d6..2173442da8 100644 --- a/src/mbgl/annotation/annotation_manager.hpp +++ b/src/mbgl/annotation/annotation_manager.hpp @@ -1,7 +1,7 @@ #ifndef MBGL_MAP_ANNOTATIONS #define MBGL_MAP_ANNOTATIONS -#include <mbgl/map/map.hpp> +#include <mbgl/annotation/annotation.hpp> #include <mbgl/map/geometry_tile.hpp> #include <mbgl/map/tile_id.hpp> #include <mbgl/style/style_properties.hpp> diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 0e50dae673..2fce648f2e 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -349,7 +349,7 @@ double Map::getTopOffsetPixelsForAnnotationSymbol(const std::string& symbol) { return context->invokeSync<double>(&MapContext::getTopOffsetPixelsForAnnotationSymbol, symbol); } -uint32_t Map::addPointAnnotation(const PointAnnotation& annotation) { +AnnotationID Map::addPointAnnotation(const PointAnnotation& annotation) { return addPointAnnotations({ annotation }).front(); } @@ -359,7 +359,7 @@ AnnotationIDs Map::addPointAnnotations(const std::vector<PointAnnotation>& annot return result; } -uint32_t Map::addShapeAnnotation(const ShapeAnnotation& annotation) { +AnnotationID Map::addShapeAnnotation(const ShapeAnnotation& annotation) { return addShapeAnnotations({ annotation }).front(); } @@ -369,20 +369,20 @@ AnnotationIDs Map::addShapeAnnotations(const std::vector<ShapeAnnotation>& annot return result; } -void Map::removeAnnotation(uint32_t annotation) { +void Map::removeAnnotation(AnnotationID annotation) { removeAnnotations({ annotation }); } -void Map::removeAnnotations(const std::vector<uint32_t>& annotations) { +void Map::removeAnnotations(const AnnotationIDs& annotations) { data->getAnnotationManager()->removeAnnotations(annotations, getMaxZoom()); update(Update::Annotations); } -std::vector<uint32_t> Map::getAnnotationsInBounds(const LatLngBounds& bounds, const AnnotationType& type) { +AnnotationIDs Map::getAnnotationsInBounds(const LatLngBounds& bounds, const AnnotationType& type) { return data->getAnnotationManager()->getAnnotationsInBounds(bounds, getMaxZoom(), type); } -LatLngBounds Map::getBoundsForAnnotations(const std::vector<uint32_t>& annotations) { +LatLngBounds Map::getBoundsForAnnotations(const AnnotationIDs& annotations) { return data->getAnnotationManager()->getBoundsForAnnotations(annotations); } |