Skip to content

More SymbolLayer properties + sourceLayerIdentifier support + zoom levels + local image support #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ let package = Package(
.package(url: "https://github.com/maplibre/maplibre-gl-native-distribution.git", from: "6.4.0"),
.package(url: "https://github.com/stadiamaps/maplibre-swift-macros.git", from: "0.0.3"),
// Testing
.package(url: "https://github.com/Kolos65/Mockable.git", branch: "main"),
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.15.3"),
.package(url: "https://github.com/Kolos65/Mockable.git", exact: "0.0.9"),
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.17.2"),
],
targets: [
.target(
Expand Down
6 changes: 5 additions & 1 deletion Sources/MapLibreSwiftDSL/Style Layers/Line.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import MapLibreSwiftMacros
@MLNRawRepresentableStyleProperty<LineJoin>("lineJoin")
@MLNStyleProperty<Float>("lineWidth", supportsInterpolation: true)
public struct LineStyleLayer: SourceBoundVectorStyleLayerDefinition {

public let identifier: String
public let sourceLayerIdentifier: String?
public var insertionPosition: LayerInsertionPosition = .aboveOthers
public var isVisible: Bool = true
public var maximumZoomLevel: Float? = nil
Expand All @@ -21,11 +23,13 @@ public struct LineStyleLayer: SourceBoundVectorStyleLayerDefinition {
public init(identifier: String, source: Source) {
self.identifier = identifier
self.source = .source(source)
self.sourceLayerIdentifier = nil
}

public init(identifier: String, source: MLNSource) {
public init(identifier: String, source: MLNSource, sourceLayerIdentifier: String? = nil) {
self.identifier = identifier
self.source = .mglSource(source)
self.sourceLayerIdentifier = sourceLayerIdentifier
}

public func makeStyleLayer(style: MLNStyle) -> StyleLayer {
Expand Down
2 changes: 2 additions & 0 deletions Sources/MapLibreSwiftDSL/Style Layers/Style Layer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ public protocol StyleLayerDefinition {

public protocol SourceBoundStyleLayerDefinition: StyleLayerDefinition {
var source: StyleLayerSource { get set }

var sourceLayerIdentifier: String? { get }
}

/// Based on MLNVectorStyleLayer
Expand Down
Loading