From b7b8baef9d30d31a757dbbc0fbb8cb2c5cf3585e Mon Sep 17 00:00:00 2001 From: Fabian Guerra Soto Date: Wed, 18 Oct 2017 15:18:54 -0400 Subject: [ios, macos] Add selection support to MGLMultiPoint annotations. (#9984) * [ios, macos] Add selection support to MGLMultiPoint annotations. * [ios, macos] Update changelogs. --- src/mbgl/annotation/shape_annotation_impl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mbgl/annotation/shape_annotation_impl.cpp') diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index 0c1a631ad8..9288159b6a 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -15,7 +16,7 @@ namespace geojsonvt = mapbox::geojsonvt; ShapeAnnotationImpl::ShapeAnnotationImpl(const AnnotationID id_, const uint8_t maxZoom_) : id(id_), maxZoom(maxZoom_), - layerID("com.mapbox.annotations.shape." + util::toString(id)) { + layerID(AnnotationManager::ShapeLayerID + util::toString(id)) { } void ShapeAnnotationImpl::updateTileData(const CanonicalTileID& tileID, AnnotationTileData& data) { -- cgit v1.2.1 From ac32b41493956e6b03ab13475f27a4dcd64355ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Fri, 22 Dec 2017 16:27:31 +0100 Subject: [core] don't tie Annotation geometries to Map maxzoom Instead, geometry generation via GeoJSONVT is now bound to the hardcoded limit of the annotation tile source. --- src/mbgl/annotation/shape_annotation_impl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mbgl/annotation/shape_annotation_impl.cpp') diff --git a/src/mbgl/annotation/shape_annotation_impl.cpp b/src/mbgl/annotation/shape_annotation_impl.cpp index 9288159b6a..715dce484e 100644 --- a/src/mbgl/annotation/shape_annotation_impl.cpp +++ b/src/mbgl/annotation/shape_annotation_impl.cpp @@ -13,9 +13,8 @@ namespace mbgl { using namespace style; namespace geojsonvt = mapbox::geojsonvt; -ShapeAnnotationImpl::ShapeAnnotationImpl(const AnnotationID id_, const uint8_t maxZoom_) +ShapeAnnotationImpl::ShapeAnnotationImpl(const AnnotationID id_) : id(id_), - maxZoom(maxZoom_), layerID(AnnotationManager::ShapeLayerID + util::toString(id)) { } @@ -28,7 +27,9 @@ void ShapeAnnotationImpl::updateTileData(const CanonicalTileID& tileID, Annotati return Feature { std::move(geom) }; })); mapbox::geojsonvt::Options options; - options.maxZoom = maxZoom; + // The annotation source is currently hard coded to maxzoom 16, so we're topping out at z16 + // here as well. + options.maxZoom = 16; options.buffer = 255u; options.extent = util::EXTENT; options.tolerance = baseTolerance; -- cgit v1.2.1