Skip to content

Commit 857c1ce

Browse files
committed
adding example
1 parent ea40ab1 commit 857c1ce

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/MapLibreSwiftUI/Examples/Layers.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ let clustered = ShapeSource(identifier: "points", options: [.clustered: true, .c
123123
.iconColor(.white)
124124
.predicate(NSPredicate(format: "cluster != YES"))
125125
}
126+
.onTapMapGesture(on: ["simple-circles-non-clusters"], onTapChanged: { _, features in
127+
print("Tapped on \(features.first)")
128+
})
129+
.expandClustersOnTapping(clusteredLayers: [ClusterLayer(
130+
layerIdentifier: "simple-circles-clusters",
131+
sourceIdentifier: "points"
132+
)])
126133
.ignoresSafeArea(.all)
127134
}
128135

0 commit comments

Comments
 (0)