This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if which swiftlint >/dev/null; then | |
swiftlint | |
else | |
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dict> | |
<key>ForDelivery</key> | |
<string>Help your driver delivery items on time</string> | |
<key>BackupKey</key> | |
<string>Use BackupKey to get this explanation</string> | |
</dict> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<key>NSLocationDefaultAccuracyReduced</key> | |
<false/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@objc func animatePolylineDashAnimation() { | |
//Iterate each valid coordinate on the path | |
if i < path.count() { | |
newPath.add(path.coordinate(at: i)) | |
newPolyline.path = newPath | |
newPolyline.strokeWidth = 4 | |
let dashLength = calculateDashLength(zoomLevel: mapView.camera.zoom) | |
let clearDashLength = Int(Double(dashLength) * 0.5) | |
let lengths = [dashLength, clearDashLength] // Play with this for dotted line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@objc func animatePolylineWithGradient() { | |
//Iterate each valid coordinate on the path | |
if i < path.count() { | |
newPath.add(path.coordinate(at: i)) | |
newPolyline.path = newPath | |
newPolyline.strokeWidth = 4 | |
newPolyline.spans = [GMSStyleSpan(style: .gradient(from: UIColor(rgb: 0x38726E), to: UIColor(rgb: 0x404969)))] | |
newPolyline.map = mapView | |
i += 1 | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//STEP 3: - ANIMATIONS | |
@objc func animatePolylinePath() { | |
//Iterate each valid coordinate on the path | |
if i < path.count() { | |
newPath.add(path.coordinate(at: i)) | |
newPolyline.path = newPath | |
newPolyline.strokeColor = UIColor.black | |
newPolyline.strokeWidth = 4 | |
newPolyline.map = mapView | |
i += 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//STEP 2: - DRAW A ROUTE ON THE MAP | |
func drawRouteOnMap(route: String?) { | |
guard let route = route else {return} | |
guard let path = GMSPath(fromEncodedPath: route) else {return} | |
self.path = path | |
let polyline = GMSPolyline(path: path) | |
polyline.strokeColor = .gray | |
polyline.strokeWidth = 2 | |
polyline.map = mapView |
NewerOlder