@@ -23,12 +23,20 @@ This package provides a small, focused API for composing KML documents suitable
2323
2424---
2525
26+ ## Example Output
27+ Using the example given on the [ ForeFlight website] ( https://foreflight.com/support/user-map-shapes/ ) the below is generated using this Framework.
28+
29+ See ` /Tests/ForeFlightKMLTests/UserMapShapesSampleFullTest.swift `
30+
31+ <img width =" 615 " height =" 770 " alt =" Image " src =" https://github.com/user-attachments/assets/65da168d-e886-4ddf-8bc0-d4fa1f247331 " />
32+
2633## Minimal Quick Start
2734
2835``` swift
2936import ForeFlightKML
3037import Geodesy (we use this for Coordinate and relative positioniong)
3138
39+ // Example: Airport Traffic Pattern
3240let builder = ForeFlightKMLBuilder (documentName : " Airport with ATZ" )
3341
3442// Runway centerline
@@ -47,7 +55,7 @@ builder.addLineCircle(
4755)
4856
4957let url = FileManager.default .temporaryDirectory .appendingPathComponent (" shapes.kml" )
50- try return builder.build ().write (to : url, atomically : true , encoding : .utf8 )
58+ try builder.build ().write (to : url, atomically : true , encoding : .utf8 )
5159presentShareSheet (with : url)
5260```
5361
@@ -57,7 +65,9 @@ presentShareSheet(with: url)
5765## API quick reference (important types)
5866
5967- ` ForeFlightKMLBuilder ` — builder for the KML document. Methods: ` addPlacemark(_:) ` , ` kmlString() ` .
68+ - ` Placemark ` — a Feature containing a geometry (must implement ` KMLElement ` ). Optionally attach a ` KMLStyle ` .
6069- Geometry types: ` Point ` , ` Line ` , ` LineCircle ` , ` LineSegment ` (segment of a Circle), ` Polygon ` , ` PolygonCircle ` (filled circle), ` PolygonSegment ` (filled segment) ` LinearRing ` .
70+ - ` Style ` and substyles: ` LineStyle ` , ` PolyStyle ` , ` IconStyle ` , ` LabelStyle ` .
6171- ` KMLColor ` — helper to create the aabbggrr color values used by KML.
6272
6373Full public API surface is visible in the package sources; the README examples show common usage patterns.
0 commit comments