Skip to content

Commit

Permalink
Merge pull request #35 from vincentneo/rtept-support++
Browse files Browse the repository at this point in the history
route print support, fix #33
  • Loading branch information
vincentneo authored Jan 14, 2023
2 parents fb809d8 + 9a406bf commit 5b50a56
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Avenue/MKSnapshotDrawer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,23 @@ class MKSnapshotDrawer {
let allCoordinates = allTrackSegments.map({
$0.points.map({$0.coordinate})
})
let allPoints = allCoordinates.map({

let trackPoints = allCoordinates.map({
$0.map({ snapshot.point(for: $0) })
})

let routeCoordinates = self.gpx.routes.map({
$0.points.map({$0.coordinate})
})

let routePoints = routeCoordinates.map({
$0.map({ snapshot.point(for: $0) })
})

var allPoints = [[NSPoint]]()
allPoints.append(contentsOf: trackPoints)
allPoints.append(contentsOf: routePoints)

image.lockFocus()

for lineSet in allPoints {
Expand Down

0 comments on commit 5b50a56

Please sign in to comment.