From d71bec432907a0274463a7e6baa65b69cc8a40e7 Mon Sep 17 00:00:00 2001 From: PW Date: Tue, 23 Jan 2024 13:25:27 +0100 Subject: [PATCH] adding example --- Sources/MapLibreSwiftUI/Examples/Layers.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Sources/MapLibreSwiftUI/Examples/Layers.swift b/Sources/MapLibreSwiftUI/Examples/Layers.swift index ee0205e..7cba97a 100644 --- a/Sources/MapLibreSwiftUI/Examples/Layers.swift +++ b/Sources/MapLibreSwiftUI/Examples/Layers.swift @@ -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) {