diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-05-31 17:34:11 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-06-01 17:37:01 -0700 |
commit | 0fba70d5a8465499b0dce900e5aa74f7189e4594 (patch) | |
tree | 7902b9bd29d25de0de6d116fc3245b1b269477f4 /platform/darwin/src/MGLPolygon.mm | |
parent | cfd6757ecc9bd4d9b1f4c5266d19da48c529f58b (diff) | |
download | qtlocation-mapboxgl-0fba70d5a8465499b0dce900e5aa74f7189e4594.tar.gz |
[all] Rationalize annotation API
Diffstat (limited to 'platform/darwin/src/MGLPolygon.mm')
-rw-r--r-- | platform/darwin/src/MGLPolygon.mm | 14 |
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 |