Skip to content

Commit

Permalink
Add Geocoding Operation
Browse files Browse the repository at this point in the history
  • Loading branch information
lminhtm committed Aug 24, 2019
1 parent 5c5905f commit 8688224
Show file tree
Hide file tree
Showing 27 changed files with 1,137 additions and 704 deletions.
8 changes: 2 additions & 6 deletions Example/LMGeocoder.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -343,21 +343,17 @@
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-LMGeocoder_Example/Pods-LMGeocoder_Example-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-LMGeocoder_Example/Pods-LMGeocoder_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/LMGeocoder/LMGeocoder.framework",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/LMGeocoder.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LMGeocoder_Example/Pods-LMGeocoder_Example-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-LMGeocoder_Example/Pods-LMGeocoder_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,198 @@
<Bucket
type = "0"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../LMGeocoder/Classes/LMGeocodingOperation.m"
timestampString = "588339804.107419"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "129"
endingLineNumber = "129"
landmarkName = "-start"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../LMGeocoder/Classes/LMGeocodingOperation.m"
timestampString = "588339804.1074851"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "244"
endingLineNumber = "244"
landmarkName = "-reverseGeocodeCoordinate:service:alternativeService:completionHandler:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../LMGeocoder/Classes/LMGeocodingOperation.m"
timestampString = "588339804.107533"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "108"
endingLineNumber = "108"
landmarkName = "-cancel"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../LMGeocoder/Classes/LMGeocodingOperation.m"
timestampString = "588339804.107577"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "342"
endingLineNumber = "342"
landmarkName = "-buildAsynchronousRequestFromURLString:completionHandler:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../LMGeocoder/Classes/LMGeocodingOperation.m"
timestampString = "588339804.107618"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "296"
endingLineNumber = "296"
landmarkName = "-reverseGeocodeCoordinate:service:alternativeService:completionHandler:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../LMGeocoder/Classes/LMGeocodingOperation.m"
timestampString = "588339804.1076601"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "301"
endingLineNumber = "301"
landmarkName = "-reverseGeocodeCoordinate:service:alternativeService:completionHandler:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../LMGeocoder/Classes/LMGeocodingOperation.m"
timestampString = "588339804.108016"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "175"
endingLineNumber = "175"
landmarkName = "-geocodeAddressString:service:alternativeService:completionHandler:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../LMGeocoder/Classes/LMGeocodingOperation.m"
timestampString = "588339804.108061"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "192"
endingLineNumber = "192"
landmarkName = "-geocodeAddressString:service:alternativeService:completionHandler:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../LMGeocoder/Classes/LMGeocodingOperation.m"
timestampString = "588339804.108104"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "204"
endingLineNumber = "204"
landmarkName = "-geocodeAddressString:service:alternativeService:completionHandler:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../LMGeocoder/Classes/LMGeocodingOperation.m"
timestampString = "588339804.108144"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "212"
endingLineNumber = "212"
landmarkName = "-geocodeAddressString:service:alternativeService:completionHandler:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../LMGeocoder/Classes/LMGeocodingOperation.m"
timestampString = "588339804.108182"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "223"
endingLineNumber = "223"
landmarkName = "-geocodeAddressString:service:alternativeService:completionHandler:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "../LMGeocoder/Classes/LMGeocodingOperation.m"
timestampString = "588339804.108219"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "183"
endingLineNumber = "183"
landmarkName = "-geocodeAddressString:service:alternativeService:completionHandler:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
9 changes: 4 additions & 5 deletions Example/LMGeocoder/LMViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray
self.longitudeLabel.text = [NSString stringWithFormat:@"%f", coordinate.longitude];

// Start to reverse
[[LMGeocoder sharedInstance] cancelGeocode];
[[LMGeocoder sharedInstance] reverseGeocodeCoordinate:coordinate
service:kLMGeocoderAppleService
service:LMGeocoderServiceGoogle
alternativeService:LMGeocoderServiceApple
completionHandler:^(NSArray *results, NSError *error) {

// Parse formatted address
Expand All @@ -106,11 +106,10 @@ - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray
LMAddress *address = [results firstObject];
formattedAddress = address.formattedAddress;
}
NSLog(@"%@", formattedAddress);

// Update UI
dispatch_async(dispatch_get_main_queue(), ^{
self.addressLabel.text = formattedAddress;
});
self.addressLabel.text = formattedAddress;
}];
}

Expand Down
6 changes: 3 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- LMGeocoder (1.0.9)
- LMGeocoder (1.1.0)

DEPENDENCIES:
- LMGeocoder (from `../`)
Expand All @@ -9,8 +9,8 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
LMGeocoder: 056421f0dcd71972f7de6b29eae7fd3785b15d45
LMGeocoder: a5f44d368721c1f5901d61a9fca2e3268e8bf7a7

PODFILE CHECKSUM: 4925dcdf83c1e8a06018d7e2f33bb6222425bf85

COCOAPODS: 1.5.3
COCOAPODS: 1.7.4
5 changes: 3 additions & 2 deletions Example/Pods/Local Podspecs/LMGeocoder.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8688224

Please sign in to comment.