Skip to content

Commit

Permalink
adding example
Browse files Browse the repository at this point in the history
  • Loading branch information
hactar committed May 15, 2024
1 parent ea40ab1 commit 857c1ce
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Sources/MapLibreSwiftUI/Examples/Layers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 857c1ce

Please sign in to comment.