{
  "accessibility" : [
    "The cluster is a container labelled \"Map controls\"; each button keeps its own label (\"Zoom in\", \"Zoom out\") and tooltip.",
    "Hit targets are at least 44 points on iOS and iPadOS.",
    "With Reduce Transparency the group is a plain container and the buttons use the system's own opaque treatment."
  ],
  "category" : "maps",
  "changelog" : [
    {
      "changes" : [
        "Release 1.1.0: see the project changelog."
      ],
      "date" : "2026-12-03",
      "version" : "1.1.0"
    },
    {
      "changes" : [
        "Initial release."
      ],
      "date" : "2026-12-02",
      "version" : "1.0.0"
    }
  ],
  "dependencies" : [
    {
      "id" : "glass-compass",
      "version" : "1.1.0"
    },
    {
      "id" : "glass-foundation",
      "version" : "1.1.0"
    },
    {
      "id" : "glass-icon-button",
      "version" : "1.1.0"
    },
    {
      "id" : "glass-maps-support",
      "version" : "1.1.0"
    }
  ],
  "description" : "Zoom and orientation actions in a glass container, independent of the map provider.",
  "examples" : [
    {
      "code" : "import SwiftUI\nimport SPGlassKit\n#if canImport(MapKit)\nimport MapKit\n#endif\n\npublic struct GlassMapControlsExample: GlassExample {\n    public static let componentID = \"glass-map-controls\"\n    @State private var engine = SampleMapEngine()\n    #if canImport(MapKit)\n    @State private var usesMapKit = false\n    @State private var mapKitEngine = GlassMapKitEngine(\n        position: .camera(MapCamera(centerCoordinate: CLLocationCoordinate2D(latitude: 45.4215, longitude: -75.6972), distance: 6_000, heading: 30))\n    )\n    #endif\n\n    public init() {}\n\n    public var body: some View {\n        VStack(spacing: 12) {\n            #if canImport(MapKit)\n            Toggle(\"Use the MapKit adapter (loads map tiles)\", isOn: $usesMapKit)\n                .padding(.horizontal)\n            if usesMapKit {\n                mapKitMap\n            } else {\n                placeholderMap\n            }\n            #else\n            placeholderMap\n            #endif\n        }\n    }\n\n    /// A provider-independent engine: the controls only see `GlassMapEngine`.\n    private var placeholderMap: some View {\n        SampleMapBackdrop(heading: engine.heading ?? 0, zoom: engine.zoomScale)\n            .overlay(alignment: .topTrailing) {\n                GlassMapControls(engine: engine) {\n                    GlassCompass(heading: engine.heading) { engine.resetNorth() }\n                    GlassIconButton(systemImage: \"rotate.right\", accessibilityLabel: \"Rotate the sample map\") {\n                        engine.rotate(by: 45)\n                    }\n                }\n                .padding()\n            }\n            .overlay(alignment: .bottom) {\n                GlassMapControls(canZoomIn: engine.canZoomIn, canZoomOut: engine.canZoomOut, axis: .horizontal, size: .small) {\n                    engine.zoomIn()\n                } onZoomOut: {\n                    engine.zoomOut()\n                }\n                .padding(.bottom, 40)\n            }\n    }\n\n    #if canImport(MapKit)\n    private var mapKitMap: some View {\n        Map(position: $mapKitEngine.position)\n            .onMapCameraChange(frequency: .continuous) { context in\n                mapKitEngine.cameraChanged(context.camera)\n            }\n            .overlay(alignment: .topTrailing) {\n                GlassMapControls(engine: mapKitEngine)\n                    .padding()\n            }\n    }\n    #endif\n}\n\n#Preview(\"GlassMapControls\") { GlassMapControlsExample().glassTheme(.ocean) }\n",
      "title" : "GlassMapControls example"
    }
  ],
  "files" : [
    {
      "bytes" : 7298,
      "path" : "Maps/Maps/GlassMapControls.swift",
      "sha256" : "10270a0439f722fa3b950da2559c88c0d9b30135e17aa69e53cbcae0a0a5ebda"
    }
  ],
  "frameworks" : [

  ],
  "id" : "glass-map-controls",
  "kind" : "custom-glass",
  "license" : "MIT",
  "minimumOS" : {
    "iOS" : "26.0",
    "iPadOS" : "26.0",
    "macOS" : "26.0"
  },
  "name" : "GlassMapControls",
  "platforms" : [
    "iOS",
    "iPadOS",
    "macOS"
  ],
  "schemaVersion" : 1,
  "sha256" : "065c51dcf01baf889525d850dc18a69a52dd9f3a1f3e818776270003abf4cc56",
  "symbols" : [
    "GlassMapControls"
  ],
  "version" : "1.1.0"
}
