Skip to content

Commit dac040e

Browse files
pjleonard37Release SDK bot for Maps SDK teamclaude
authored andcommitted
Add Landmark Icons, Update Configs for Standard v4 (#5632)
Closes https://mapbox.atlassian.net/browse/MAPSIOS-1918. This PR updates our iOS Standard and Standard Satellite generation. Specifically it: - Adds support for Landmark Icons - Adds the LandmarkIcons featureset, enabling interactions on it - Not that there are no States for this featureset so I used an empty one - Enabling toggling on/off landmark icons in the Standard style - Regenerates our functions for creating the Standard and Standard Satellite styles. Adding the following configuratiosn: - Standard: `backgroundPointOfInterestLabels`, `colorAdminBoundaries`, `colorGreenspace`, `colorModePointOfInterestLabels`, `colorPlaceLabels`, `colorPointOfInterestLabels`, `colorRoadLabels`, `colorWater`, `densityPointOfInterestLabels`, `roadsBrightness`, `showAdminBoundaries`, `showLandmarkIconLabels` - Standard Satellite: `backgroundPointOfInterestLabels`, `colorAdminBoundaries`, `colorModePointOfInterestLabels`, `colorPlaceLabels`, `colorPointOfInterestLabels`, `colorRoadLabels`, `colorTrunks`, `densityPointOfInterestLabels`, `roadsBrightness`, `showAdminBoundaries` - Updates our generator code to handle a few special cases - Adds additional tests for new configurations --------- Co-authored-by: Release SDK bot for Maps SDK team <[email protected]> Co-authored-by: Claude <[email protected]> GitOrigin-RevId: 201eeb71966cd6f88926b527328bf7fefb2b7bcf
1 parent 3b32579 commit dac040e

File tree

13 files changed

+491
-28
lines changed

13 files changed

+491
-28
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ Mapbox welcomes participation and contributions from everyone.
44

55
## main
66

7+
* Added support for `LandmarkIcons` featureset in Mapbox Standard Style. The `LandmarkIcons` featureset allows querying and configuring landmark building icons that appear on the map. Access landmark properties including landmarkId, name, type, and localized names through the `StandardLandmarkIconsFeature` class.
8+
* Enhanced `MapStyle.standard()` and `MapStyle.standardSatellite()` with new configuration parameters for color customization, landmark icons visibility, point-of-interest styling, road appearance, and administrative boundaries.
9+
* Add configuration option to configure attribution button tint color.
10+
711
## 11.15.0-beta.1 - 12 August, 2025
812

13+
## Features ✨ and improvements 🏁
914
* Introduce experimental `Marker` convenience API in Swift UI. Use `Marker` to quickly add a `MapViewAnnotation` pin at the specified coordinates with custom text and color.
10-
1115
```swift
1216
Map {
1317
Marker(coordinate: CLLocationCoordinate2D(...))
@@ -17,7 +21,6 @@ Map {
1721
}
1822
```
1923
## 11.14.1 - 07 August, 2025
20-
* Add configuration option to configure attribution button tint color.
2124

2225
## 11.14.0 - 30 July, 2025
2326

Sources/Examples/SwiftUI Examples/StandardInteractiveFeaturesExample.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ struct StandardInteractiveFeaturesExample: View {
4242
return true
4343
}
4444

45+
/// When a landmark icon in the Standard Landmark Icons featureset is tapped, print its name
46+
TapInteraction(.standardLandmarkIcons) { landmarkIcon, _ in
47+
print(landmarkIcon.name?.description ?? "No name")
48+
return true
49+
}
50+
4551
/// When the map is long-pressed, reset all selections
4652
LongPressInteraction { _ in
4753
selectedBuildings = []
@@ -80,7 +86,7 @@ struct StandardInteractiveFeaturesExample: View {
8086
}
8187
}
8288

83-
.mapStyle(.standard(theme: theme, lightPreset: lightPreset, colorBuildingSelect: buildingSelectColor))
89+
.mapStyle(.standard(theme: theme, lightPreset: lightPreset, colorBuildingSelect: buildingSelectColor, showLandmarkIcons: true))
8490
.ignoresSafeArea()
8591
/// Debug panel
8692
.overlay(alignment: .bottom) {

Sources/MapboxMaps/Documentation.docc/API Catalogs/Featuresets and Interactions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,4 @@ In UIKit applications, use ``MapboxMap/setFeatureState(_:state:callback:)`` and
127127
- ``StandardPoiFeature``
128128
- ``StandardPlaceLabelsFeature``
129129
- ``StandardBuildingsFeature``
130+
- ``StandardLandmarkIconsFeature``

Sources/MapboxMaps/Documentation.docc/API Catalogs/Style.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
- ``StandardLightPreset``
2323
- ``StandardTheme``
2424
- ``StandardFont``
25+
- ``StandardBackgroundPointOfInterestLabels``
26+
- ``StandardColorModePointOfInterestLabels``
2527
- ``StyleProjection``
2628
- ``StyleProjectionName``
2729
- ``CancelError``

Sources/MapboxMaps/Foundation/Extensions/JSONObject+Extensions.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ extension JSONObject {
1111
}
1212
}
1313

14+
mutating func encode(key: String, value: Double?) {
15+
if let value {
16+
self[key] = .number(value)
17+
}
18+
}
19+
1420
mutating func encode<T>(key: String, value: T?) where T: RawRepresentable, T.RawValue == String {
1521
encode(key: key, value: value?.rawValue)
1622
}

Sources/MapboxMaps/Style/Generated/MapStyle+Standard.swift

Lines changed: 79 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/MapboxMaps/Style/Generated/MapStyle+StandardSatellite.swift

Lines changed: 35 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/MapboxMaps/Style/Generated/StandardBuildingsFeature.swift

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)