<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/View/mapFeatureSelectionDisabled(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4ViewP08_MapKit_aB0E27mapFeatureSelectionDisabledyQrSbAD0dG0VcF"
  },
  "title" : "mapFeatureSelectionDisabled(_:)"
}
-->

# mapFeatureSelectionDisabled(_:)

Specifies which map features should have selection disabled.

```
@MainActor @preconcurrency func mapFeatureSelectionDisabled(_ selectionDisabled: @escaping (MapFeature) -> Bool) -> some View
```

## Parameters

`selectionDisabled`

Determines if selection should be disabled for a given
map feature.

## Discussion

The `selectionDisabled` parameter takes a closure which maps map features, to booleans. If
that closure returns true for a given map feature, that map feature will be considered unselectable.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)