Skip to content

Commit 21f9556

Browse files
committed
Merge branch 'master' of https://github.com/SvenTiigi/FlyoverKit
2 parents 89ae069 + 93d52b4 commit 21f9556

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

README.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,63 @@ let camera = FlyoverCamera(
218218
```
219219

220220
## FlyoverMapView
221-
`Coming soon`
221+
The `FlyoverMapView` is a preconfigured `MKMapView` with an embedded `FlyoverCamera`. The `FlyoverMapView` offers various convenience functions for example starting a flyover with a `MKAnnotation` object or setting a supported Flyover `MapType`.
222222

223+
```swift
224+
// Initialize with default configuration theme and standard MapType
225+
let flyoverMapView = FlyoverMapView()
226+
227+
// Or initialize by setting a different theme and the satelliteFlyover MapType
228+
let flyoverMapView = FlyoverMapView(configurationTheme: .farAway, mapType: .satelliteFlyover)
229+
```
230+
231+
### MapType
232+
The `FlyoverMapView.MapType` specifies the three supported `MKMapType`'s.
233+
234+
| MapType | Description |
235+
| ------------- | ------------- |
236+
| standard | A street map that shows the position of all roads and shows 3D buildings |
237+
| satelliteFlyover | A satellite image of the area with road and road name information layered on top |
238+
| hybridFlyover | A hybrid satellite image with flyover data where available |
223239

224240
### FlyoverMapViewController
225-
`Coming soon`
241+
The `FlyoverMapViewController` is an easy and simple way to just present a `UIViewController` with an embedded `FlyoverMapView`. You can use it if you just want to present a 360° flyover on a given `Flyover` type.
242+
243+
```swift
244+
// Initialize a location
245+
let eiffelTower = CLLocationCoordinate2DMake(48.858370, 2.294481)
246+
247+
// Initialize the FlyoverMapViewController with a Flyover object
248+
let controller = FlyoverMapViewController(flyover: eiffelTower)
249+
250+
// Present controller
251+
self.present(controller, animated: true)
252+
```
253+
254+
Additionally you can initialize the `FlyoverMapViewController` with your own `Configuration` or `Configuration.Theme` and a `MapType`
255+
256+
```swift
257+
// Initialize a location
258+
let eiffelTower = CLLocationCoordinate2DMake(48.858370, 2.294481)
259+
260+
// Initialize a Configuration
261+
let configuration = FlyoverCamera.Configuration(
262+
duration: 4.0,
263+
altitude: 600.0,
264+
pitch: 45.0,
265+
headingStep: 20.0
266+
)
267+
268+
// Initialize the FlyoverMapViewController
269+
let controller = FlyoverMapViewController(
270+
flyover: eiffelTower,
271+
configuration: configuration,
272+
mapType: .satelliteFlyover
273+
)
274+
275+
// Present controller
276+
self.present(controller, animated: true)
277+
```
226278

227279
## Contributing
228280
Contributions are very welcome 🙌 🤓

0 commit comments

Comments
 (0)