Skip to content

Commit

Permalink
Merge pull request #53 from mapbox/1ec5-polyline-11
Browse files Browse the repository at this point in the history
Depend on Polyline.framework
  • Loading branch information
1ec5 authored Nov 22, 2017
2 parents 279ce12 + 179016c commit fe46792
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 49 deletions.
2 changes: 2 additions & 0 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github "raphaelmor/Polyline" ~> 4.2

4 changes: 3 additions & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
github "AliSoftware/OHHTTPStubs" "6.0.0"
github "AliSoftware/OHHTTPStubs" "6.1.0"
github "raphaelmor/Polyline" "v4.2.0"

2 changes: 2 additions & 0 deletions MapboxStatic.swift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,6 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.module_name = "MapboxStatic"

s.dependency "Polyline", "~> 4.2"

end
96 changes: 92 additions & 4 deletions MapboxStatic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@
DA1BA2861E6D39AE007F9FAC /* path.png in Resources */ = {isa = PBXBuildFile; fileRef = DA1BA2851E6D39AE007F9FAC /* path.png */; };
DA1BA2871E6D39AE007F9FAC /* path.png in Resources */ = {isa = PBXBuildFile; fileRef = DA1BA2851E6D39AE007F9FAC /* path.png */; };
DA1BA2881E6D39AE007F9FAC /* path.png in Resources */ = {isa = PBXBuildFile; fileRef = DA1BA2851E6D39AE007F9FAC /* path.png */; };
DA0584D61E5EE5E6006F138F /* Polyline.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA0584D51E5EE5E6006F138F /* Polyline.framework */; };
DA0584D81E5EE601006F138F /* Polyline.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA0584D71E5EE601006F138F /* Polyline.framework */; };
DA0584DA1E5EE60A006F138F /* Polyline.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA0584D91E5EE60A006F138F /* Polyline.framework */; };
DA0584DC1E5EE60F006F138F /* Polyline.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA0584DB1E5EE60F006F138F /* Polyline.framework */; };
DA20FB9E1CE3DEBB00B07762 /* MapboxStatic.h in Headers */ = {isa = PBXBuildFile; fileRef = DA20FB9D1CE3DEBB00B07762 /* MapboxStatic.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA20FBA21CE3DEBB00B07762 /* MapboxStatic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA20FB9B1CE3DEBB00B07762 /* MapboxStatic.framework */; };
DA20FBA81CE3DF6900B07762 /* Snapshot.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAD19871BD9B3970057AC9F /* Snapshot.swift */; };
DA20FBAA1CE401E800B07762 /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20FBA91CE401E800B07762 /* Color.swift */; };
DA20FBAC1CE4026B00B07762 /* Overlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20FBAB1CE4026B00B07762 /* Overlay.swift */; };
Expand Down Expand Up @@ -126,6 +129,13 @@
DAE8CCC41E6E992E009B5CB0 /* zoom-gl.png in Resources */ = {isa = PBXBuildFile; fileRef = DAE8CCC31E6E992E009B5CB0 /* zoom-gl.png */; };
DAE8CCC51E6E992E009B5CB0 /* zoom-gl.png in Resources */ = {isa = PBXBuildFile; fileRef = DAE8CCC31E6E992E009B5CB0 /* zoom-gl.png */; };
DAE8CCC61E6E992E009B5CB0 /* zoom-gl.png in Resources */ = {isa = PBXBuildFile; fileRef = DAE8CCC31E6E992E009B5CB0 /* zoom-gl.png */; };
DAA4014D1E7652EE00998ACE /* Polyline.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA0584D51E5EE5E6006F138F /* Polyline.framework */; };
DAA4014E1E7652F600998ACE /* Polyline.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA0584D71E5EE601006F138F /* Polyline.framework */; };
DAA4014F1E7652FB00998ACE /* Polyline.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA0584D91E5EE60A006F138F /* Polyline.framework */; };
DAA401531E7656B900998ACE /* MapboxStatic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA20FB9B1CE3DEBB00B07762 /* MapboxStatic.framework */; };
DAA401541E7656B900998ACE /* MapboxStatic.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA20FB9B1CE3DEBB00B07762 /* MapboxStatic.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DAA401561E7656F000998ACE /* MapboxStatic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA20FB9B1CE3DEBB00B07762 /* MapboxStatic.framework */; };
DAA401571E7656F000998ACE /* MapboxStatic.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA20FB9B1CE3DEBB00B07762 /* MapboxStatic.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
DAF158881D03E7AC00829B35 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAF158871D03E7AC00829B35 /* Launch Screen.storyboard */; };
DAF158891D03E7AC00829B35 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DAF158871D03E7AC00829B35 /* Launch Screen.storyboard */; };
DAF15A431CE8FBBC0040E86C /* MapboxStatic.h in Headers */ = {isa = PBXBuildFile; fileRef = DA20FB9D1CE3DEBB00B07762 /* MapboxStatic.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand All @@ -135,7 +145,6 @@
DAF15A4F1CE90A6C0040E86C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DAF15A4E1CE90A6C0040E86C /* main.m */; };
DAF15A521CE90A6C0040E86C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DAF15A511CE90A6C0040E86C /* AppDelegate.m */; };
DAF15A551CE90A6C0040E86C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DAF15A541CE90A6C0040E86C /* ViewController.m */; };
DAF15A631CE90CE70040E86C /* MapboxStatic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA20FB9B1CE3DEBB00B07762 /* MapboxStatic.framework */; };
DD0C88181BE1A9E100606E9F /* polyline.geojson in Resources */ = {isa = PBXBuildFile; fileRef = DD0C88161BE1A9D400606E9F /* polyline.geojson */; };
DD685BA91BDB14C1002E2BB2 /* MapboxStaticTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAD19831BD9B2F80057AC9F /* MapboxStaticTests.swift */; };
DDAD19711BD9B1A50057AC9F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDAD196E1BD9B1A50057AC9F /* AppDelegate.swift */; };
Expand Down Expand Up @@ -180,6 +189,31 @@
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
DAA401551E7656B900998ACE /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
DAA401541E7656B900998ACE /* MapboxStatic.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
DAA401581E7656F000998ACE /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
DAA401571E7656F000998ACE /* MapboxStatic.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
DA031C611E6F4824007CA06A /* rotate.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rotate.png; sourceTree = "<group>"; };
DA031C651E6F487E007CA06A /* tilt.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tilt.png; sourceTree = "<group>"; };
Expand Down Expand Up @@ -208,6 +242,10 @@
DA1BA27D1E6D2DE3007F9FAC /* rocket.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = rocket.png; sourceTree = "<group>"; };
DA1BA2811E6D3386007F9FAC /* geojson.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = geojson.png; sourceTree = "<group>"; };
DA1BA2851E6D39AE007F9FAC /* path.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = path.png; sourceTree = "<group>"; };
DA0584D51E5EE5E6006F138F /* Polyline.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Polyline.framework; path = Carthage/Build/iOS/Polyline.framework; sourceTree = "<group>"; };
DA0584D71E5EE601006F138F /* Polyline.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Polyline.framework; path = Carthage/Build/Mac/Polyline.framework; sourceTree = "<group>"; };
DA0584D91E5EE60A006F138F /* Polyline.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Polyline.framework; path = Carthage/Build/tvOS/Polyline.framework; sourceTree = "<group>"; };
DA0584DB1E5EE60F006F138F /* Polyline.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Polyline.framework; path = Carthage/Build/watchOS/Polyline.framework; sourceTree = "<group>"; };
DA20FB9B1CE3DEBB00B07762 /* MapboxStatic.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MapboxStatic.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DA20FB9D1CE3DEBB00B07762 /* MapboxStatic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MapboxStatic.h; sourceTree = "<group>"; };
DA20FB9F1CE3DEBB00B07762 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -251,13 +289,15 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DA0584D61E5EE5E6006F138F /* Polyline.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
DA20FBB51CE4757E00B07762 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DA0584D81E5EE601006F138F /* Polyline.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -266,13 +306,15 @@
buildActionMask = 2147483647;
files = (
DA9CC68D1E5C551000A14964 /* OHHTTPStubs.framework in Frameworks */,
DAA4014E1E7652F600998ACE /* Polyline.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
DA4B4B8E1CE8F83100296A52 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DA0584DA1E5EE60A006F138F /* Polyline.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -281,29 +323,31 @@
buildActionMask = 2147483647;
files = (
DA9CC68F1E5C551500A14964 /* OHHTTPStubs.framework in Frameworks */,
DAA4014F1E7652FB00998ACE /* Polyline.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
DAF15A371CE8FB8D0040E86C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DA0584DC1E5EE60F006F138F /* Polyline.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
DAF15A481CE90A6C0040E86C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DAF15A631CE90CE70040E86C /* MapboxStatic.framework in Frameworks */,
DAA401561E7656F000998ACE /* MapboxStatic.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
DDAD19561BD9B1780057AC9F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
DA20FBA21CE3DEBB00B07762 /* MapboxStatic.framework in Frameworks */,
DAA401531E7656B900998ACE /* MapboxStatic.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -312,6 +356,7 @@
buildActionMask = 2147483647;
files = (
DA9CC68B1E5C550000A14964 /* OHHTTPStubs.framework in Frameworks */,
DAA4014D1E7652EE00998ACE /* Polyline.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -336,6 +381,10 @@
DA9CC6891E5C550000A14964 /* Frameworks */ = {
isa = PBXGroup;
children = (
DA0584DB1E5EE60F006F138F /* Polyline.framework */,
DA0584D91E5EE60A006F138F /* Polyline.framework */,
DA0584D71E5EE601006F138F /* Polyline.framework */,
DA0584D51E5EE5E6006F138F /* Polyline.framework */,
DA9CC68E1E5C551500A14964 /* OHHTTPStubs.framework */,
DA9CC68C1E5C551000A14964 /* OHHTTPStubs.framework */,
DA9CC68A1E5C550000A14964 /* OHHTTPStubs.framework */,
Expand Down Expand Up @@ -607,6 +656,7 @@
DAF15A471CE90A6C0040E86C /* Sources */,
DAF15A481CE90A6C0040E86C /* Frameworks */,
DAF15A491CE90A6C0040E86C /* Resources */,
DAA401581E7656F000998ACE /* Embed Frameworks */,
);
buildRules = (
);
Expand All @@ -625,6 +675,7 @@
DDAD19551BD9B1780057AC9F /* Sources */,
DDAD19561BD9B1780057AC9F /* Frameworks */,
DDAD19571BD9B1780057AC9F /* Resources */,
DAA401551E7656B900998ACE /* Embed Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -885,6 +936,7 @@
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/iOS/OHHTTPStubs.framework",
"$(SRCROOT)/Carthage/Build/iOS/Polyline.framework",
);
name = "Copy Frameworks";
outputPaths = (
Expand All @@ -900,6 +952,7 @@
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/Mac/OHHTTPStubs.framework",
"$(SRCROOT)/Carthage/Build/Mac/Polyline.framework",
);
name = "Copy Frameworks";
outputPaths = (
Expand All @@ -915,6 +968,7 @@
);
inputPaths = (
"$(SRCROOT)/Carthage/Build/tvOS/OHHTTPStubs.framework",
"$(SRCROOT)/Carthage/Build/tvOS/Polyline.framework",
);
name = "Copy Frameworks";
outputPaths = (
Expand Down Expand Up @@ -1071,6 +1125,10 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 7;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = MapboxStatic/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand All @@ -1093,6 +1151,10 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 7;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
INFOPLIST_FILE = MapboxStatic/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand All @@ -1116,6 +1178,10 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 7;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
);
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = MapboxStatic/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -1141,6 +1207,10 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 7;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/Mac",
);
FRAMEWORK_VERSION = A;
INFOPLIST_FILE = MapboxStatic/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down Expand Up @@ -1203,6 +1273,10 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 7;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/tvOS",
);
INFOPLIST_FILE = "$(SRCROOT)/MapboxStatic/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand All @@ -1228,6 +1302,10 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 7;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/tvOS",
);
INFOPLIST_FILE = "$(SRCROOT)/MapboxStatic/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand Down Expand Up @@ -1290,6 +1368,10 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 7;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/watchOS",
);
INFOPLIST_FILE = MapboxStatic/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand All @@ -1316,6 +1398,10 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 7;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Carthage/Build/watchOS",
);
INFOPLIST_FILE = MapboxStatic/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand Down Expand Up @@ -1452,6 +1538,7 @@
DDAD196C1BD9B1780057AC9F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CURRENT_PROJECT_VERSION = 7;
INFOPLIST_FILE = "$(SRCROOT)/Example/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand All @@ -1465,6 +1552,7 @@
DDAD196D1BD9B1780057AC9F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CURRENT_PROJECT_VERSION = 7;
INFOPLIST_FILE = "$(SRCROOT)/Example/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand Down
40 changes: 2 additions & 38 deletions MapboxStatic/Overlay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#else
import UIKit
#endif
import Polyline

let allowedCharacterSet: CharacterSet = {
var characterSet = CharacterSet.urlPathAllowed
Expand Down Expand Up @@ -384,45 +385,8 @@ open class Path: NSObject, Overlay {
}
}

// based on https://github.com/mapbox/polyline
fileprivate func polylineEncode(_ coordinates: [CLLocationCoordinate2D]) -> String {

func encodeCoordinate(_ coordinate: CLLocationDegrees) -> String {

var c = Int(round(coordinate * 1e5))

c = c << 1

if c < 0 {
c = ~c
}

var output = ""

while c >= 0x20 {
output += String(describing: UnicodeScalar((0x20 | (c & 0x1f)) + 63)!)
c = c >> 5
}

output += String(describing: UnicodeScalar(c + 63)!)

return output
}

var output = encodeCoordinate(coordinates[0].latitude) + encodeCoordinate(coordinates[0].longitude)

for i in 1 ..< coordinates.count {
let a = coordinates[i]
let b = coordinates[i - 1]
output += encodeCoordinate(a.latitude - b.latitude)
output += encodeCoordinate(a.longitude - b.longitude)
}

return output
}

open override var description: String {
let encodedPolyline = polylineEncode(coordinates).addingPercentEncoding(withAllowedCharacters: allowedCharacterSet)!
let encodedPolyline = encodeCoordinates(coordinates).addingPercentEncoding(withAllowedCharacters: allowedCharacterSet)!
var description = "path-\(strokeWidth)+\(strokeColor.toHexString())-\(strokeColor.alphaComponent)"
if fillColor.alphaComponent > 0 {
description += "+\(fillColor.toHexString())-\(fillColor.alphaComponent)"
Expand Down
Loading

0 comments on commit fe46792

Please sign in to comment.