Skip to content

Commit 58475ea

Browse files
committed
Dismiss callout before identify.
1 parent 932e928 commit 58475ea

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Shared/Samples/Identify features in WMS layer/IdentifyFeaturesInWMSLayerView.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ struct IdentifyFeaturesInWMSLayerView: View {
6969
guard let screenPoint = tapScreenPoint else {
7070
return
7171
}
72+
calloutPlacement = nil
73+
7274
// Identify feature on water info layer.
7375
let identifyResult = try await mapViewProxy.identify(
7476
on: waterInfoLayer,
@@ -83,9 +85,6 @@ struct IdentifyFeaturesInWMSLayerView: View {
8385
let location = mapViewProxy.location(fromScreenPoint: screenPoint) {
8486
webViewText = htmlText
8587
calloutPlacement = .location(location)
86-
} else {
87-
webViewText = ""
88-
calloutPlacement = nil
8988
}
9089
} catch {
9190
self.error = error

0 commit comments

Comments
 (0)