mapkit

iOS MKDirections for multiple destinations and a single source

别说谁变了你拦得住时间么 提交于 2019-12-21 06:45:30
问题 My application needs to get the "closest" walking point to the user from a set of 10. I have seen that MKDirections does this with "calculateDirectionsWithCompletionHandler" for a single source, destination locations. My question is, do I have do make 10 requests and then check which one is the closest one in distance or there is a way of sending multiple destinations and the response would be the closest one walking? Thank you 回答1: As far as I'm aware there is no way to specify more than two

Check if user location is inside a shape

北战南征 提交于 2019-12-21 06:38:16
问题 I made this method to check if an user location is inside a polygon on a map view (mapkit). I pass to the method the current user location (CLLocationCoordinate2D) and return a boolean just to know if the user is in a polygon or not. func userInsidePolygon(userlocation: CLLocationCoordinate2D ) -> Bool{ // get every overlay on the map let o = self.mapView.overlays // loop every overlay on map for overlay in o { // handle only polygon if overlay is MKPolygon{ let polygon:MKPolygon = overlay as

Google Maps SDK & Mapkit in the same app cause crash

和自甴很熟 提交于 2019-12-21 02:51:28
问题 trying to give the user the option to choose between google maps (sdk) and apple maps (mapkit) in my app. the app is not using ARC. crash scenario (ios 6.0 / 6.1): 1. enter google maps (modal controller). 2. exit google maps (dismiss modal). 3. change in my app to apple maps (mapkit). 4. enter apple maps (modal controller). the app crashes and i get: [EAGLContext setCurrentContext:] the error won't occur if i don't release google maps in the dealloc, but it's probably will cause a memory leak

Plotting a users route taken on a map using MKPolyline

家住魔仙堡 提交于 2019-12-21 02:51:19
问题 I'm quite new to Objective-c. In my app, I'm trying to plot the users taken route onto a map. Here is what I have so far that just gets the users current location: #import "StartCycleViewController.h" #import "CrumbPath.h" @interface StartCycleViewController () @property (nonatomic, strong) CLLocationManager *locationManager; @property (nonatomic, strong) IBOutlet MKMapView *map; @property (nonatomic, strong) UIView *containerView; @end @implementation StartCycleViewController @synthesize

IPhone : google maps directions

风格不统一 提交于 2019-12-21 02:39:11
问题 i'm developing an iPhone app which embed a mapView made with mkmapkit. I got two coordinates and I'm tracing the direction between these two points. Everything works well. I'm using google maps api : maps.googleapis.com/maps/api/directions to retrieve xml with all the steps of the direction. But one thing is very strange : I just can't understand why driving direction is not accurate. Between two steps it trace a right line and don't follow the road while walking travel mode trace a very

MKReverseGeocoder server returned error: 503

孤者浪人 提交于 2019-12-21 02:01:33
问题 Currently i am developing an iPhone application where i have to show user's current city and location for which i am using Mapkit Framework.When i build the application it works fine and show me the exact city details .But right now when i try to build the application again application shows following error message in my log /SourceCache/ProtocolBuffer_Sim/ProtocolBuffer-26/Runtime/PBRequester.m:523 server returned error: 503 reverseGeocoder: didFailWithError:Error Domain

MKReverseGeocoder server returned error: 503

佐手、 提交于 2019-12-21 02:01:28
问题 Currently i am developing an iPhone application where i have to show user's current city and location for which i am using Mapkit Framework.When i build the application it works fine and show me the exact city details .But right now when i try to build the application again application shows following error message in my log /SourceCache/ProtocolBuffer_Sim/ProtocolBuffer-26/Runtime/PBRequester.m:523 server returned error: 503 reverseGeocoder: didFailWithError:Error Domain

Show Current User Location with MKMapView?

白昼怎懂夜的黑 提交于 2019-12-20 15:25:12
问题 I am trying to show current location of user by setting the property of MKMapView i.e setShowsUserLocation to YES . As by default an arrow appears on the top left of iPhone screen when the application starts updating the user location.But after showing the current location the arrow should disappear but its still present as long as the app is running which would mean the app is still updating the location in the background? so how can i stop updating the current location? i have implemented

iOS8 MKMapView Framebuffer error during rotation when autoresize is applied

纵饮孤独 提交于 2019-12-20 14:43:32
问题 #import "AppDelegate.h" #import <MapKit/MapKit.h> @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions { [self setWindow:[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]]; [self.window makeKeyAndVisible]; UIViewController *vc = [[UIViewController alloc] init]; self.window.rootViewController = vc; vc.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

iOS8 MKMapView Framebuffer error during rotation when autoresize is applied

送分小仙女□ 提交于 2019-12-20 14:43:10
问题 #import "AppDelegate.h" #import <MapKit/MapKit.h> @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions { [self setWindow:[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]]; [self.window makeKeyAndVisible]; UIViewController *vc = [[UIViewController alloc] init]; self.window.rootViewController = vc; vc.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;