summaryrefslogtreecommitdiff
path: root/include/mbgl/annotation
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-05-26 15:59:23 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-01 17:36:50 -0700
commitaa1a54c577a95082824f2a5a6bdf4948506fcaa9 (patch)
tree47ebfe8eab89811cbd877308cf981254f22226f7 /include/mbgl/annotation
parentefaf6461aa99a5d42ce97c0bd8daf352e5b486f8 (diff)
downloadqtlocation-mapboxgl-aa1a54c577a95082824f2a5a6bdf4948506fcaa9.tar.gz
[core] Do annotation longitude wrapping together with latitude clamping
Diffstat (limited to 'include/mbgl/annotation')
-rw-r--r--include/mbgl/annotation/shape_annotation.hpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/include/mbgl/annotation/shape_annotation.hpp b/include/mbgl/annotation/shape_annotation.hpp
index 6e3fe95dd4..c5d4c42d87 100644
--- a/include/mbgl/annotation/shape_annotation.hpp
+++ b/include/mbgl/annotation/shape_annotation.hpp
@@ -31,24 +31,10 @@ public:
std::string>; // creates an annotation whose type and properties are sourced from a style layer
ShapeAnnotation(const AnnotationSegments& segments_, const Properties& properties_)
- : segments(wrapCoordinates(segments_)), properties(properties_) {}
+ : segments(segments_), properties(properties_) {}
const AnnotationSegments segments;
const Properties properties;
-
-private:
- AnnotationSegments wrapCoordinates(const AnnotationSegments& segments_) {
- AnnotationSegments wrappedSegments;
- // Wrap all segments coordinates.
- for (const auto& segment_ : segments_) {
- AnnotationSegment wrappedSegment;
- for (const auto& latLng_ : segment_) {
- wrappedSegment.push_back(latLng_.wrapped());
- }
- wrappedSegments.push_back(wrappedSegment);
- }
- return wrappedSegments;
- }
};
} // namespace mbgl