summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLPolygon.mm
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-05-31 17:34:11 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-01 17:37:01 -0700
commit0fba70d5a8465499b0dce900e5aa74f7189e4594 (patch)
tree7902b9bd29d25de0de6d116fc3245b1b269477f4 /platform/darwin/src/MGLPolygon.mm
parentcfd6757ecc9bd4d9b1f4c5266d19da48c529f58b (diff)
downloadqtlocation-mapboxgl-0fba70d5a8465499b0dce900e5aa74f7189e4594.tar.gz
[all] Rationalize annotation API
Diffstat (limited to 'platform/darwin/src/MGLPolygon.mm')
-rw-r--r--platform/darwin/src/MGLPolygon.mm14
1 files changed, 7 insertions, 7 deletions
diff --git a/platform/darwin/src/MGLPolygon.mm b/platform/darwin/src/MGLPolygon.mm
index 47be070246..c009d9e3d6 100644
--- a/platform/darwin/src/MGLPolygon.mm
+++ b/platform/darwin/src/MGLPolygon.mm
@@ -36,19 +36,19 @@
return result;
}
-- (mbgl::ShapeAnnotation)shapeAnnotationObjectWithDelegate:(id <MGLMultiPointDelegate>)delegate {
- mbgl::FillAnnotationProperties fillProperties;
- fillProperties.opacity = [delegate alphaForShapeAnnotation:self];
- fillProperties.outlineColor = [delegate strokeColorForShapeAnnotation:self];
- fillProperties.color = [delegate fillColorForPolygonAnnotation:self];
-
+- (mbgl::Annotation)annotationObjectWithDelegate:(id <MGLMultiPointDelegate>)delegate {
mbgl::Polygon<double> geometry;
geometry.push_back(self.ring);
for (MGLPolygon *polygon in self.interiorPolygons) {
geometry.push_back(polygon.ring);
}
- return mbgl::ShapeAnnotation(geometry, fillProperties);
+ mbgl::FillAnnotation annotation { geometry };
+ annotation.opacity = [delegate alphaForShapeAnnotation:self];
+ annotation.outlineColor = [delegate strokeColorForShapeAnnotation:self];
+ annotation.color = [delegate fillColorForPolygonAnnotation:self];
+
+ return annotation;
}
@end