mapbox / mapbox-annotation-extension

Framework extensions that can be used with the Mapbox Maps SDK for iOS.
ISC License
11 stars 18 forks source link

Line style annotation support. #17

Closed fabian-guerra closed 5 years ago

fabian-guerra commented 5 years ago

Adds support for line style layer paint properties.

This is an example on how a developer may use the api:

        let coordinates = [
            CLLocationCoordinate2D(latitude: 59.31, longitude: 18.06),
            CLLocationCoordinate2D(latitude: 59.30, longitude: 18.05)
        ]
        let lineAnnotationController = MGLLineAnnotationController(mapView: mapView)
        lineAnnotationController.lineCap = .round
        let lineAnnotation1 = MGLLineStyleAnnotation(coordinates, count: UInt(coordinates.count), color: .purple)
        lineAnnotation1.lineWidth = 5
        lineAnnotationController.add([lineAnnotation1])