Skip to content

Commit

Permalink
Merge pull request #27 from susemi99/develop
Browse files Browse the repository at this point in the history
fix get latitude of placemark in KML
  • Loading branch information
Changhoon, Jin authored Apr 7, 2017
2 parents e3f5b3a + b9b588c commit 98989a4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 0 additions & 2 deletions GPXTracker2/GPXTracker2.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = E0767966E32D469CA8B635CF /* Pods-GPXTracker2.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
INFOPLIST_FILE = GPXTracker2/Info.plist;
Expand All @@ -418,7 +417,6 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 17DBFA0F9565D349935C5913 /* Pods-GPXTracker2.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
INFOPLIST_FILE = GPXTracker2/Info.plist;
Expand Down
6 changes: 3 additions & 3 deletions GPXTracker2/GPXTracker2/KMLParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ class KMLParser {
for _ in placemark.css("Point") {
guard let coordinates = placemark.css("coordinates").first?.text else {continue}

let split = coordinates.characters.split{$0 == ","}.map(String.init)
let lon:NSString = split[0] as NSString
let lat:NSString = split[1] as NSString
let split = coordinates.components(separatedBy: ",")
let lon:NSString = split[0].trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) as NSString
let lat:NSString = split[1].trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) as NSString
let location = CLLocationCoordinate2D(latitude: lat.doubleValue, longitude: lon.doubleValue)
guard let styleUrlString = placemark.css("styleUrl").first?.text else {continue}
let styleUrl = styleUrlString.replacingOccurrences(of: "#", with: "")
Expand Down
10 changes: 5 additions & 5 deletions GPXTracker2/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
PODS:
- Kanna (2.0.0)
- PKHUD (4.0.0)
- Kanna (2.2.1)
- PKHUD (4.2.1)

DEPENDENCIES:
- Kanna
- PKHUD (~> 4.0)

SPEC CHECKSUMS:
Kanna: 9a6637f72f5c77fe9c045b1efb2a5bb074754af8
PKHUD: 2bb45c936bb8afa39f3cd33ec14e8cc89f624255
Kanna: 182789ab065e8f9a6ccc2a74ce6283d3401c0c4a
PKHUD: 957ce2a68b3c97a51839b30216120c1dbc0c3a78

PODFILE CHECKSUM: ccfb35d564849c3d1ed350b45ab5bc6b3ca1646e

COCOAPODS: 1.1.1
COCOAPODS: 1.2.0

0 comments on commit 98989a4

Please sign in to comment.