Commit 656262f4 authored by Deployer's avatar Deployer

Fixes demo app layout on iPad.

parent 4e7b809f
......@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'CedarMaps'
s.version = '3.1.0'
s.version = '3.1.1'
s.summary = 'CedarMaps iOS SDK'
# This description is used to generate tags and improve search results.
......
......@@ -92,13 +92,13 @@
typedef void (^CSForwardGeocodeCompletionHandler)(NSArray<CSForwardGeocodePlacemark *> * __nullable placemarks, NSError * __nullable error);
typedef NS_OPTIONS(NSUInteger, CSPlacemarkType) {
CSPlacemarkTypeAll = 0,
CSPlacemarkTypeRoundabout = 1 << 0,
CSPlacemarkTypeStreet = 1 << 1,
CSPlacemarkTypeFreeway = 1 << 2,
CSPlacemarkTypeExpressway = 1 << 3,
CSPlacemarkTypeBoulevard = 1 << 4,
CSPlacemarkTypeLocality = 1 << 5,
CSPlacemarkTypePOI = 1 << 6
CSPlacemarkTypeAll = 1 << 0,
CSPlacemarkTypeRoundabout = 1 << 1,
CSPlacemarkTypeStreet = 1 << 2,
CSPlacemarkTypeFreeway = 1 << 3,
CSPlacemarkTypeExpressway = 1 << 4,
CSPlacemarkTypeBoulevard = 1 << 5,
CSPlacemarkTypeLocality = 1 << 6,
CSPlacemarkTypePOI = 1 << 7
};
NSString* _Nonnull stringValueForPlacemarkType(CSPlacemarkType type);
......@@ -162,6 +162,15 @@
/**
Implementation is not final yet. DO NOT USE.
*/
- (void)geocodeAddressString:(nonnull NSString *)addressString
inProximity:(CLLocationCoordinate2D)coordinate
withType:(CSPlacemarkType)type
limit:(NSInteger)limit
completionHandler:(nonnull CSForwardGeocodeCompletionHandler)completionHandler;
/**
* This method calculates directions using car profile between a source and a destination.
*
* Up to 100 pairs of source and destionation points can be provided to calculate a multiple step routing.
......
......@@ -271,6 +271,35 @@ typedef void (^CSNetworkResponseCompletionHandler)(NSData * _Nullable data, NSUR
[self parseGeocodingResponseForURLString:urlStr completionHandler:completionHandler];
}
- (void)geocodeAddressString:(NSString *)addressString
inProximity:(CLLocationCoordinate2D)coordinate
withType:(CSPlacemarkType)type
limit:(NSInteger)limit
completionHandler:(CSForwardGeocodeCompletionHandler)completionHandler {
if (addressString.length == 0) {
completionHandler(nil, [CSError errorWithDescription:@"Empty input"]);
return;
}
int limitParam = MIN(MAX((int)limit, 1), 30);
NSString *urlStr = [NSString stringWithFormat:@"%@geocode/%@/%@?limit=%i&proximity=%f,%f",
[CSAuthenticationManager.sharedAuthenticationManager baseURL],
self.mapID,
addressString,
limitParam,
coordinate.latitude,
coordinate.longitude];
NSString *typeParam = stringValueForPlacemarkType(type);
if (typeParam.length > 0) {
urlStr = [urlStr stringByAppendingFormat:@"&type=%@", typeParam];
}
[self parseGeocodingResponseForURLString:urlStr completionHandler:completionHandler];
}
- (void)parseGeocodingResponseForURLString:(nonnull NSString *)urlStr
completionHandler:(CSForwardGeocodeCompletionHandler)completionHandler {
......
......@@ -9,7 +9,7 @@
import UIKit
import CedarMaps
class CSForwardGeocodeViewController: UIViewController {
final class CSForwardGeocodeViewController: UIViewController {
private var filteredResults = [CSForwardGeocodePlacemark]() {
didSet {
......
......@@ -9,7 +9,7 @@
import UIKit
import CedarMaps
class CSMapSnapshotViewController: KeyboardEntryViewController {
final class CSMapSnapshotViewController: KeyboardEntryViewController {
@IBOutlet private weak var imageView: UIImageView!
@IBOutlet private weak var hintLabel: UILabel!
......
......@@ -9,7 +9,7 @@
import UIKit
import CedarMaps
class CSReverseGeocodeViewController: UIViewController {
final class CSReverseGeocodeViewController: UIViewController {
@IBOutlet private weak var mapView: CSMapView! {
didSet {
......
......@@ -9,7 +9,7 @@
import UIKit
import CedarMaps
class CSSearchResultCell: UITableViewCell {
final class CSSearchResultCell: UITableViewCell {
var placemark: CSForwardGeocodePlacemark! {
didSet {
......
PODS:
- CedarMaps (3.1.0):
- CedarMaps (3.1.1):
- Mantle (~> 2.1)
- Mapbox-iOS-SDK (~> 4.0)
- Mantle (2.1.0):
- Mantle/extobjc (= 2.1.0)
- Mantle/extobjc (2.1.0)
- Mapbox-iOS-SDK (4.2.0)
- Mapbox-iOS-SDK (4.4.1)
DEPENDENCIES:
- CedarMaps (from `../`)
......@@ -20,9 +20,9 @@ EXTERNAL SOURCES:
:path: "../"
SPEC CHECKSUMS:
CedarMaps: ae649c5786fbbceac6ce2a3e69ca5f6a692c6b25
CedarMaps: 8ec531d1ce64ee3fea8dedb082c20fd3fe4c4257
Mantle: 2fa750afa478cd625a94230fbf1c13462f29395b
Mapbox-iOS-SDK: 706d52e3ad095e16944d9643f37d5a97627f6c19
Mapbox-iOS-SDK: e6a4f236c77f914ca2e19b929c6cc6b077ba1c4c
PODFILE CHECKSUM: ad43b9956cf1f58bff64834a5e21f42f322108fa
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment