Skip to content

Commit

Permalink
Resolve type inference ambiguity in examples (#2184)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksproger committed Jun 12, 2024
1 parent ef62a57 commit 1b6d7fd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ private final class Route {
guard !displayed, let mapView else { return }
displayed = true

func colorExpression(normal: String, selected: String) -> Expression {
func colorExpression(normal: String, selected: String) -> MapboxMaps.Expression {
Exp(.switchCase) {
Exp(.boolean) {
Exp(.featureState) { "selected" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ final class PointAnnotationClusteringExample: UIViewController, ExampleProtocol
}

// Create a cluster property to add to each cluster
let clusterProperties: [String: Expression] = [
let clusterProperties: [String: MapboxMaps.Expression] = [
"sum": sumExpression
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ final class SymbolClusteringExample: UIViewController, ExampleProtocol {
}

// Add the expressions to the cluster as ClusterProperties so they can be accessed below
let clusterProperties: [String: Expression] = [
let clusterProperties: [String: MapboxMaps.Expression] = [
"max": maxExpression,
"in_e9": ine9Expression,
"sum": sumExpression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ final class PitchAndDistanceExample: UIViewController, ExampleProtocol {

// Add an additional condition to the current filter
// to filter based on ["pitch"] and ["distance-from-center"]
func updateFilter(currentFilter: Expression) -> Expression {
func updateFilter(currentFilter: MapboxMaps.Expression) -> MapboxMaps.Expression {
let updatedFilter = Exp(.all) {
currentFilter
Exp(.switchCase) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ struct AnnotationsExample: View {
}

// Create a cluster property to add to each cluster
let clusterProperties: [String: Expression] = [
let clusterProperties: [String: MapboxMaps.Expression] = [
"sum": sumExpression
]

Expand Down

0 comments on commit 1b6d7fd

Please sign in to comment.