From f74ca45b9c3853358a1c417e9e15568559966c38 Mon Sep 17 00:00:00 2001 From: jmkiley Date: Thu, 10 Oct 2019 16:28:23 -0700 Subject: [ios] Update code snippet --- platform/darwin/src/MGLShapeSource.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'platform/darwin/src/MGLShapeSource.h') diff --git a/platform/darwin/src/MGLShapeSource.h b/platform/darwin/src/MGLShapeSource.h index 685a7116a2..675c219300 100644 --- a/platform/darwin/src/MGLShapeSource.h +++ b/platform/darwin/src/MGLShapeSource.h @@ -57,10 +57,9 @@ FOUNDATION_EXTERN MGL_EXPORT const MGLShapeSourceOption MGLShapeSourceOptionClus attribute values are accessed from individual features within a cluster. ```swift - let key = "sumValue" - let firstExpression = NSExpression(format: "sum({ $featureAccumulated, %@ })", key) + let firstExpression = NSExpression(format: "sum:({$featureAccumulated, sumValue})") let secondExpression = NSExpression(forKeyPath: "magnitude") - let clusterPropertiesDictionary = [key : [firstExpression, secondExpression]] + let clusterPropertiesDictionary = ["sumValue" : [firstExpression, secondExpression]] let options : [MGLShapeSourceOption : Any] = [.clustered : true, .clusterProperties: clusterPropertiesDictionary] -- cgit v1.2.1