Skip to content

Commit

Permalink
adding example
Browse files Browse the repository at this point in the history
  • Loading branch information
hactar committed Jan 23, 2024
1 parent 116bf8b commit d71bec4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Sources/MapLibreSwiftUI/Examples/Layers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ struct Layer_Previews: PreviewProvider {
}
.ignoresSafeArea(.all)
.previewDisplayName("Rotated Symbols (Dynamic)")

MapView(styleURL: demoTilesURL) {
// Simple symbol layer demonstration with an icon
CircleStyleLayer(identifier: "simple-circles", source: pointSource)
.circleRadius(constant: 16)
.circleColor(constant: .systemRed)
.circleStrokeWidth(constant: 2)
.circleStrokeColor(constant: .white)
.
SymbolStyleLayer(identifier: "simple-symbols", source: pointSource)
.iconImage(constant: UIImage(systemName: "mappin")!)
}
.ignoresSafeArea(.all)
.previewDisplayName("Circles with Symbols")

// FIXME: This appears to be broken upstream; waiting for a new release
// MapView(styleURL: demoTilesURL) {
Expand Down

0 comments on commit d71bec4

Please sign in to comment.