From 857c1ce1327f233d30f37c6d99eb158e7c5d938c Mon Sep 17 00:00:00 2001 From: PW Date: Wed, 15 May 2024 14:02:58 +0200 Subject: [PATCH] adding example --- Sources/MapLibreSwiftUI/Examples/Layers.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Sources/MapLibreSwiftUI/Examples/Layers.swift b/Sources/MapLibreSwiftUI/Examples/Layers.swift index 05b7013..27e09bd 100644 --- a/Sources/MapLibreSwiftUI/Examples/Layers.swift +++ b/Sources/MapLibreSwiftUI/Examples/Layers.swift @@ -123,6 +123,13 @@ let clustered = ShapeSource(identifier: "points", options: [.clustered: true, .c .iconColor(.white) .predicate(NSPredicate(format: "cluster != YES")) } + .onTapMapGesture(on: ["simple-circles-non-clusters"], onTapChanged: { _, features in + print("Tapped on \(features.first)") + }) + .expandClustersOnTapping(clusteredLayers: [ClusterLayer( + layerIdentifier: "simple-circles-clusters", + sourceIdentifier: "points" + )]) .ignoresSafeArea(.all) }