FAQ Database Discussion Community


MKDirections multiple locations xcode 6.2 Mapkit

xcode,mapkit,mkannotationview
I am using xcode beta 6.2. It shouldn't matter as my question is in relation to the API's - specifically calling MKDirections with MKDirectionsRequest's. Please note there is one other similar question posted to this forum, that does not provide a solution: iOS MKDirections for multiple destinations and a single...

How can i know which geopoint(lat/lng) belong to which country without reverse geocoding?

ios,google-maps,geolocation,mapkit,reverse-geocoding
I am making a camping app where i would show on map number of checkins/users to user per country initially, then when map is zoomed, it will show checkins per city in a particular country, when zoomed again, it will show sector wise checkins. I wanted to ask is there...

Multiple Pin subtitle annotations in MapKit?

ios,objective-c,mapkit,mkannotationview
I am parsing data from a csv file with coordinates and other information. I have the pins plotted and I would like to know how to add other pieces of data in the subtitle object of the pins. Here is my approach (the object I'm trying to add is "temperature"):...

How to pull out latitude/longitude coordinates from MKMapItem

core-data,mapkit,cllocation,mkmapitem
I'm creating an app that uses CoreData to store points of interest. MKMapItem coordinates are accessible within mapItem.placemark.location. I'd like to pull out the individual latitude and longitude coordinates and store them in a managedObjectContext as doubles. How would I do that?

Zooming to users location iOS 8 MapKit Obj-C

objective-c,ios8,mapkit
I have no issues displaying a users current location, but I am having trouble trying to zoom to it. I have found a few solutions from other posts here, but nothing seems to be working. Advice is appreciated as it is highly likely that I am missing something simple. Here...

iOS Custom annotations for MKMapView

ios,mkmapview,mapkit,mkannotation,mkannotationview
First of all I'm using kingpin in order to display an array of annotations. Everything works just as expected. My question is: How can I create a custom view for an annotation? And I'm not referring to replacing the image of MKPinAnnotationView. if (annotationView == nil) { annotationView = [[MKPinAnnotationView...

Adding -ObjC flag in xcode

ios,google-maps,mapkit,google-street-view
I am trying to integrate google Street View Image API into my iOS app, but in order to use their SDK I need to use the -ObjC linker flag to load their category methods. Everything works perfectly without the linker, but when I add the -ObjC flag in Xcode I...

Storing CLLocationCoordinates in Core Data

ios,core-data,mapkit,cllocation,mkmapitem
I've encountered an issue when storing a MKMapItem that I was able to resolve by looking at compiler warnings, but I don't understand why I was able to resolve it or if I utilized "best practices". I have an Object model that stores latitude and longitude coordinates from an MKMapItem...

iOS Custom Annotation: A view below the annotation pin

ios,objective-c,mapkit,mapkitannotation
I need to replace the default annotation view with my custom annotation view. I need the do following things: Custom Annotation view with an image view embedded in it. A view below it which contains a label in it. For more clarification see the image: In the above image I...

I am trying to create a route in Swift between two points, but my MKDirectionsResponse seems to get an error

ios,swift,mapkit,cllocation
I am trying to learn how to generate a route between two locations, so I created a project with fake locations and stuff so that once I "get it" I can implement it in my real app. I am trying to generate a route between "location" and "next", but am...

load objects from parse and display on map

ios,objective-c,parse.com,mapkit
Working on an App that allow user to see what local people have posted (businesses, schools, or just people). I am able to post the information and save it to parse. I am also able to download user data near current location, but it issue is that my helper method...

Add Overlay to Mapview

ios,objective-c,mapkit
I have been doing iOS dev for a few months. I already have a map view with a couple of annotations pinned to it and can show the users current location. I haven been trying to read through the docs to implement a simple overlay using a set of CLLocationCoordinate2D...

How to zoom in and center the user location (Objective-C)

ios,objective-c,mapkit
How do I zoom in and center the user location "dot"? I've tried everything I've found on here and on other sites, but I can't seem to get it right. Please help me! EDIT: I've tried to implement this line of code in viewDidAppear. I found it in an old...

How to obtain a MKPlacemark Address for a callout

objective-c,ios8,mapkit,mkmapitem,mkplacemark
I'm trying to figure out how to get the street address for an MKPlacemark item. I print an item out in console and I can see the information's there, but I'm only getting the thoroughfare info without the street address number. Here's my code: - (void)performSearch { MKLocalSearchRequest *request =...

How to draw UIBezierPath overlay on MKMapView?

ios,mkmapview,mapkit,mkoverlay
I try to subclass from MKOverlayPathRenderer and implement -createPath - (void)createPath { MKPolyline *line = (id)self.overlay; MKMapPoint *points = line.points; NSUInteger pointCount = line.pointCount; CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint(path, NULL, points[0].x, points[0].y); for (int i = 1; i < pointCount; i++) { CGPathAddLineToPoint(path, NULL, points[i].x, points[i].y); } [self setPath:path]; }...

How can I add a button to MKPointAnnotation?

ios,objective-c,swift,mapkit
I just wrote few lines of code and got stuck trying add a detail button to my annotation point, I don't know how. Does anyone know how to do that? The image below shows what I want to achieve. Thanks! import UIKit import MapKit import CoreLocation class MapKitViewController: UIViewController, MKMapViewDelegate...

Swift: Reduce Function with a closure

swift,mapkit,reduce
Below is the code that I'm struggling to understand: let rectToDisplay = self.treasures.reduce(MKMapRectNull) { //1 (mapRect: MKMapRect, treasure: Treasure) -> MKMapRect in //2 let treasurePointRect = MKMapRect(origin: treasure.location.mapPoint, size: MKMapSize(width: 0, height: 0)) //3 return MKMapRectUnion(mapRect, treasurePointRect) } My understanding of reduce function is: var people [] // an array...

Xcode Error: Outlets cannot be connected to repeating content

ios,xcode,uitableview,swift,mapkit
After doing some searching and editing, I can't seem to find a solution to fixing this error. I'm trying to link my location search results with a table to display the search results in a list-form. I have my map with the details button linked with a UIViewController called 'FirstViewController.'...

More than one Pin annotation

ios,xcode,swift,annotations,mapkit
I have annotation that will show on long press (1sec) and I want to create more than one annotation because now I can create only one annotation. So I want to ask you guys how can I do it? Code for annotation setup: in viewDidLoad var longPress = UILongPressGestureRecognizer(target: self,...

Are using Apple Maps in iOS applicaitons is free of charge?

ios,iphone,mapkit
I just need a straight forward answer. Is using AppleMaps in iOS free of charge? Can't find any straight forward answer on the net. I know that Google limits free map loads to 25k per day over 90 days. No limits on Apple Maps?

Understand the response of Open street map query response

ios,iphone,mkmapview,mapkit,openstreetmap
I am trying to get the speed limit of the surrounding locations of a specific coordinate. OSM Query: www.overpass-api.de/api/xapi?*[maxspeed=*][bbox=5.6283473,50.5348043,5.6285261,50.534884] Response: <?xml version="1.0" encoding="UTF-8"?> <osm version="0.6" generator="Overpass API"> <note>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</note> <meta osm_base="2015-06-09T07:04:02Z"/> <node id="21265775" lat="50.5350159" lon="5.6293520"/> <node...

Swift - Getting address from coordinates

ios,swift,mapkit,mkannotation
I have a local search that creates annotations for each search result. I'm trying to add an call out accessory to each of the annotations, and once that will be pressed, the Maps app will open and set directions on how to get to the certain location. The problem that...

IOS/MapKit: Launch Native Map App by Clicking on MKPlacemark

ios,mapkit,mkmapitem,mkplacemark
IOS newb just learning Mapkit. I load a map in my app using MKPlacemark. However some users may want to use more advanced features such as driving directions and for this, I think, they would be better off launching the native app on top of mine (with my app still...

MKAnnotationView not working properly

ios,objective-c,mapkit,mkannotation,mkannotationview
I'm trying to replace the MKAnnotationView image depending on an object value, the code is executed but the images are randomly assigned so they are not matched with the correct values. - (MKAnnotationView *)mapView:(MKMapView *)mapview viewForAnnotation:(EventAnnotation *)annotation{ if ([annotation isKindOfClass:[MKUserLocation class]]) return nil; static NSString* AnnotationIdentifier = @"AnnotationIdentifier"; MKAnnotationView *annotationView...

MKMapView Crash on Selection of Annotation and then Immediate deallocation of map view

ios,objective-c,annotations,mapkit,uisplitviewcontroller
I have a splitviewcontroller application where the master view controller is a UITableView and the detail view controller contains a MKMapView and a single annotation. When I make a selection in the UITableView the secondary view segues to a different map view with a single annotation. When I select an...

Adding a custom annotation to a MKMapview

ios,mkmapview,mapkit,mapkitannotation
I am trying to add annotations to a MKMapView I have created a class CustomMapPin which conforms to the MKAnnotation protocol #import <Foundation/Foundation.h> #import <MapKit/MapKit.h> @interface CustomMapPin : NSObject <MKAnnotation> { CLLocationCoordinate2D coordinate; NSString *title; NSString *subtitle; } @property(nonatomic, assign) CLLocationCoordinate2D coordinate; @property(nonatomic, copy) NSString *title; @property(nonatomic, copy) NSString *subtitle;...

detecting tap in map circle overlay always returning false

ios,swift,mapkit
I have a map with a circle overlay and it's always returning false from the CGPathContainsPoint method. Am I passing in the wrong tapPoint values? func didTapMap(gestureRecognizer: UIGestureRecognizer) { let tapPoint: CGPoint = gestureRecognizer.locationInView(map) NSLog("%@,%@",tapPoint.x, tapPoint.y) for overlay in self.map.overlays{ if (overlay.isKindOfClass(MKCircle)) { let circle = overlay as MKCircle let...

Update custom annotation pin image to standard annotation pin in swift

ios,swift,annotations,mapkit,coordinates
I want to update map view every 60 seconds & make an annotation with custom pin/image but want to show standard pin [red color - See Figure 6-1] icon to the previously drawn annotation. I tried like below code but that does not working properly. With another custom image it...

unrecognized selector isPitched called

ios,objective-c,mapkit,selector
In my app, I am displaying a map with annotations, and the user can browse the list of annotations in a table view (in a modal view controller). I am experiencing a weird bug that I can reproduce both on device and in the simulator (iOS 7 & 8). When...

Where is MapKit Step polyline?

ios,mapkit
I am trying to print coordinates of all route steps, similar to Google Maps SDK's "legs". But it tells me that I cannot use polyline property to obtain a coordinate? ...

How to find road distance between two Coordinates and make a polyline between same points?

ios,xcode6,mapkit
I want to find road distance between two coordinates. Firstly i am taking source and destination from user and then using googleMap api i find the coordinates. I am able to find coordinates and air distance but i am unable to find road distance and draw a polyline between them....

User location in mapView doesn't show on several simulator devices (MapKit)

ios,objective-c,iphone,mapkit
I've implemented a mapView that finds the user location and displays it, but the problem is that it doesn't work on iPhone 4S, iPhone 5, iPhone 5S, and iPhone 6 Plus in the iOS simulator, only on iPhone 6. The strange thing is that it works on my real iPhone...

Get road distance with MAPKIT - Swift

ios,swift,mapkit
What are the classes I should look into if I want to get road distance? All I want to be able to get is the road-distance from point A to point B, I don't need to show step by step directions nor the map. Any suggestions? Thanks...

Make a segue from map view when annotation is clicked

ios,iphone,swift,mapkit,mapkitannotation
I am having trouble creating a segue from my Map view to another View Controller. I want the user to click an annotation and have another view controller pop up. I am having trouble creating the segue between the annotation press and the next view controller. I named my segue...

addAnnotation not updating Map?

ios,objective-c,mapkit
I created the following method to add pins to my map view. I have tried calling it to get it to add the single pin but it does nothing when I call it from a different view controller? -(void)addPins:(NSDecimalNumber*) woX ycoord:(NSDecimalNumber*) woY { CLLocationCoordinate2D coordinate; coordinate.latitude = 35; coordinate.longitude =...

CLLocationDistance not working - swift

ios,xcode,swift,mapkit,cllocation
I'm having problems with this code, I can't calculate the distance between two locations. I've already searched all over the internet but I could not solve it. Here is my didUpdateLocations function: func locationManager(manager:CLLocationManager, didUpdateLocations locations:[AnyObject]) { var userLocation:CLLocation = locations[0] as CLLocation var startLocation = userLocation var endLocation =...

MapKit Overlay Swift Issue

swift,mapkit,mkoverlay
I am currently not able to clear the overlay.I would like to clear my overlay that was traveled and then start again. I have looked at a ton of different lines of code and cant seem to figure it out. Could you please help me out on this. I am...

Why are my custom annotation images changing?

ios,objective-c,cocoa-touch,mapkit,mkannotationview
I have 21 different images that I am using for custom annotations on a map. When I load the map initially, everything is perfect. It is when I navigate off of the area and back in that it seems that the images change. The annotation pins no longer correspond with...

Does MapKit include bus route?

ios8,mapkit
I'm wondering does MapKit include bus route? When I create a new project with MapKit framework, I can choose routing with bus, or even ferry. But MKDirectionsTransportType only has three types, which are automobile, walk and any. Do I have to use Google API to get that feature? Thank you...

MKAnnotation subclass issues

ios,xcode,swift,mapkit,mkannotation
I upgraded to Swift 1.2 last night, and I got a bug I really can't figure out. The below code worked fine in the previous version of Xcode and Swift. //MARK: Annotation Object class PointAnnotation : NSObject, MKAnnotation { var coordinate: CLLocationCoordinate2D var title: String var subtitle: String var point:...

In Swift, can I detect if a CLLocation is valid or not?

ios,swift,mapkit,core-location
I am passing a location to another UIViewController which has a MapView using prepareForSegue. I call this receivedLocation. The map centers on the location that is passed. If the user clicks a button to take them to the map without first sending a location, won't this fail? How can I...

Identify when MKRoutestep finishes

ios,navigation,mapkit,directions,mkpolyline
I am trying to implement a turn by turn navigation system in iOS using MKDirections API. I am able to get the directions of the route and can draw the polyline on the map, and when navigation starts the app start showing the instructions using the MKRouteStep object in Steps...

MKPolylineView initWithPolyLine: is deprecated in iOS 7

ios,mkmapview,mapkit,deprecated,mkpolyline
I am getting the following error: initWithPolyline: is deprecated: first deprecated in iOS 7.0 MKPolylineView *lineView = [[MKPolylineView alloc] initWithPolyline:overlay]; What is the replacement method of instead of this ?...

Port existing obj c code to swift - unexpectedly found nil while unwrapping an Optional value

objective-c,xcode,swift,mapkit,mkannotation
I am trying to use obj c library in swift but I am having issue with the following error: fatal error: unexpectedly found nil while unwrapping an Optional value I think that I am missing something in var annotationView:MKPinAnnotationView! declaration is wrong but can't find a way around. Code is:...

Swift - fatal error: unexpectedly found nil while unwrapping an Optional value on MKCoordinateRegionMakeWithDistance

ios,swift,mapkit
I'm trying to get my map to show directions to a local searched location from the current user location. I'm getting an EXC_BAD_INSTRUCTION on the line: let region = MKCoordinateRegionMakeWithDistance(userLocation.location.coordinate, 2000, 2000)` And on the line: else { self.showRoute(response) } I have a feeling the nil it's receiving is from...

What is the difference in between declaring a float as constant and declaring float as variable? [closed]

objective-c,mapkit
I have this issue,but have no idea why it happens. I have these constants: #define RADIUS 100 #define LATITUDE 43.7539490 #define LONGITUDE -79.7412050 and when i use these constants to draw a circle on map,it works fine. CLLocationCoordinate2D location; location.latitude = LATITUDE; location.longitude = LONGITUDE; //use constants here //add annotation...

First Person Map View in iOS

ios,objective-c,mapkit
I am currently developing an iOS app using Objective-C and I came across with a requirement from my client that I am unsure and unaware if it can be made. The app that I am working with is Map based using the geolocalization of the user at all times. To...

Swift MapKit Annotations

swift,ios8,mapkit
I am attemping to add annotations to my app I am having trouble appending to AnyObject. The two entries (Annotation 1 Detail and 2) seem to append to the object except the second annotation overrides the first entry and I end up with 2 objects with the same detail from...

MKPolyline / MKPolylineRenderer changing color without remove it

ios,mapkit,mkpolyline
I working around with map app, I want to ask how to change the polyline color without remove and add it again, I found this topic http://stackoverflow.com/questions/24226290/mkpolylinerenderer-change-color-without-removing-overlay in stackoverflow but this is not involve with my question, I did not touch the line, so no need to do with -[MKMapViewDelegate...

Map annotation swapping from displaying image to default pin randomly

ios,mapkit,mkannotationview
When the map is tested through simulator I notice that some annotations display the default pin instead of the customized image. When I go back to the apps Home menu and enter the mapview again the same thing happens with different annotations. This code present 4 annotations out of 20...

Swift - Directions to Selected Annotation from Current Location in Maps

swift,annotations,mapkit,mklocalsearch
My app currently has a local search which adds annotations for the search results. I want to set it up where when you select the annotation and click the call out button, it will open in the Maps application with directions to the annotation from the current device location. I'm...

Tilt map in Mapkit programmatically using Swift

ios,swift,apple,mapkit
I'd like to tilt the map at startup. (Same as the user does when scrolling up or down with 2 fingers) Is this possible using Swift?...

MKAnnotation Left / Right Accessory View Misplacement

ios,mapkit,mkannotationview
Cannot figure out why this occurs. When my Title and Subtitle text is to long, I get the expected ... at the end of the text. However my left and right accessory views get messed up like this. The accessory view frame and bounds have not changed. They are the...

MapKit default zoom

swift,mapkit
For some reason my market won't zoom to the local region. In fact, it does not change the zoom no matter what I change. Am I loading it in the wrong part of the code, or am I missing something else? Any help is appreciated. My code is: @IBOutlet var...

Objective-C. How to concatenate two MKPolyline s

objective-c,mapkit
I want to construct a MKPolyline from another two. How to do that in Objective-C?

Current location title? Mapkit

ios,xcode,swift,mapkit
I'm making an application with MapKit. Here's an image of how it looks: And I want to change (Current location) title of the symbol current location from that pin. Here's code: import UIKit import CoreLocation import MapKit class ViewController: UIViewController, CLLocationManagerDelegate, MKMapViewDelegate { @IBOutlet weak var theMap: MKMapView! let locationManager...

Why my user location is always in center?

ios,objective-c,mapkit
i have a map in my app,i set the center user location when map is open. I have used this code: map.delegate=Self; ...... -(void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation { MKCoordinateRegion mapRegion; mapRegion.center = self.mapView.userLocation.coordinate; mapRegion.span = MKCoordinateSpanMake(0.5, 0.5); //Zoom distance [self.mapView setRegion:mapRegion animated: YES]; } But when i move map it...

Getting user location not working?

ios,mapkit,cllocationmanager
I am new to the MapView topic.Now I am working on the map view.I am getting the san Francisco location longitude and latitude values.I am testing in the simulator.It is not showing the current location longitude and latitude values. With the help of this tutorial http://www.creativeworkline.com/2014/12/core-location-manager-ios-8-fetching-location-background/ I am developing the...

MKDirections calculateETAWithCompletionHandler: in background state

ios,objective-c,mapkit,objective-c-blocks
I have an app which monitors significant location changes. Upon receiving a new calculation I want to calculate the duration from the current location to a specified location. To calculate the duration I use calculateETAWithCompletionHandler: from the MKDirections class. Everything works as expected as long as the app is in...

Get touch location on map

ios,mapkit
I am using following code to find latitude and longitude of touch location on map- -(void)handlePressRecognizer:(UIGestureRecognizer *)gestureRecognizer { for (PointAnnotation *ann in [mMapview annotations]) { if ([ann isKindOfClass:[PointAnnotation class]]) { [mMapview removeAnnotation:ann]; } } [mMapview removeAnnotations:[mMapview annotations]]; CGPoint touchPoint = [gestureRecognizer locationInView:mMapview]; CLLocationCoordinate2D touchMapCoordinate = [mMapview convertPoint:touchPoint toCoordinateFromView:gestureRecognizer.view]; if...

Trying to find users location in Xcode with Swift on starting the app but having optional error?

ios,xcode,swift,mapkit,core-location
I'm attempting to have the app find the user's location once the app has been started. However, I continually find an error in the viewDidLoad method as I try to requestWhenInUseAuthorization and I receive the following error: fatal error: unexpectedly found nil while unwrapping an Optional value (lldb) I would...

Unable to get custom MKAnnotationView callout to appear

objective-c,osx,mkmapview,mapkit,mkannotation
I'm building an OSX application that uses Mapkit, and I'm trying to get a callout to appear when I click on an MKAnnotationView on my map. To do this I'm implementing the MKMapViewDelegate, and the following function : - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation { if ([annotation isKindOfClass:[LocationPin class]]) { LocationPin...

How to tell if CLLocationManager is Monitoring Significant Location Changes

mapkit,core-location,cllocationmanager
I'm updating an app which monitors for significant changes to the user's location using CLLocationManager. I allow the user to toggle this option on or off, setting startMonitoringSignificantLocationChanges and stopMonitoringSignificantLocationChanges appropriately. The problem is when the user reopens the app I need to know if the app is currently monitoring...

Can't place all annotation from geoCoder on Map

ios,mapkit,clgeocoder
-(void)showLocalRestaurantsWithDishRated:(MKUserLocation *)userLocation { CLGeocoder *geoCoder = [[CLGeocoder alloc] init]; [[RestaurantController sharedInstance] getRestaurantsFromParse:^(NSMutableArray *restaurants) { NSLog(@"%@",restaurants); for (Restaurant *restaurant in restaurants) { NSLog(@"%@", restaurant.address); [geoCoder geocodeAddressString:restaurant.address completionHandler:^(NSArray *placemarks, NSError *error) { NSLog(@"%@",placemarks); for (MKPlacemark *placemark in placemarks) { MKPlacemark *newPlaceMark =...

Centering map on user location with MBXMapkit (Mapbox)

ios,mapkit,mapbox
My code to get MapKit to load on a users location upon loading worked fine until I added MapBox. I'm initializing the MBXRasterTileOverlay* rasterOverlay via -(void)loadMapBox{ _rasterOverlay = [[MBXRasterTileOverlay alloc] initWithMapID:@"myKey"]; _rasterOverlay.center = _mapView.userLocation.coordinate; } However I get a compiler error saying _rasterOverlay.center is read only. Is there any way...

iOS search api for Maps

ios,mapkit,core-location
Is there a search api for apple maps? Like in apple maps, if you start typing an address, it filters the list with some possibilities. Is this available to developers? I saw that they added some MKLocalSearch in iOS 7, but i could not find anything that gives that capability....

iOS: (Swift) How to show distance from current location and exist annotation on annotation subtitle

ios,swift,annotations,mapkit,alamofire
I am currently working on map application base on iOS using Swift language. I would like an suggestion because after I plot all the pins on map view (which I receive data from my server using JSON frameworks call Alamofire) I would like the subtitle of all annotations on map...

How to handle taps on a custom callout view?

ios,cocoa-touch,swift,mapkit
I am adding a callout view like this: func mapView(mapView: MKMapView!, didSelectAnnotationView view: MKAnnotationView!) { let calloutView = UIView(frame: CGRect(x: 0, y: 0, width: 300, height: 120)) calloutView.backgroundColor = UIColor.purpleColor() calloutView.center = CGPointMake(CGRectGetWidth(view.bounds) / 2.0, 0.0) calloutView.layer.anchorPoint = CGPointMake(0.5, 1.0) calloutView.layer.masksToBounds = false calloutView.userInteractionEnabled = true let calloutViewTapRecognizer = UITapGestureRecognizer(target:...

How can I build a route and access its coordinates?

swift,mapkit,core-location,watchkit
I'm writing an app on watchKit. My aim is to build a route between two points but I do not imagine how could I do it. On the iPhone MapKit does it for you, but can I do something similar in the watches? Can I access the route (array of...

Adding accessory button on user location callout

ios,swift,mapkit,mkuserlocation
I'm making a clickable placemark. I set the title of the placemark. Title is adress. I want If you click on that adress It will push to another View to Show Adress Number,City,Country etc. I Tried this code. But It haven't UIButton in application in placemark, why? EDIT: If I...

Find addresses from array and send it other view

ios,objective-c,mapkit,objective
I'm trying to do simple thing. I want to find an array of addresses and show it on map. But then I need to pass data to another view. The problem is: I need to pass data from dictionary which contains address, so, I need to know which exactly address...

How to request a start for startUpdatingLocation?

swift,mapkit,locationmanager
I'm starting a location manager as i open the view with this code: func locationManager(manager: CLLocationManager!, didUpdateLocations locations: [AnyObject]!) { var userLocation: CLLocation = locations[0] as! CLLocation userLatitude = userLocation.coordinate.latitude userLongitude = userLocation.coordinate.longitude if (userLocation.horizontalAccuracy < 80) { manager.stopUpdatingLocation() } else { addMapRegionAndAnnotation() } } So this means the locationManager...

Not required to import MapKit.framework?

ios,xcode,frameworks,mapkit,core-location
I'm making an app for my exam that uses theMapKitView andCoreLocation for getting different locations and adding pins to the map. But I realized that I hadn't imported the MapKit.framework in the build settings, which I always was told to do. What I don't understand is that everything still works...

MKMapView or CLLocationManger - to determine user's current location

ios,cocoa-touch,mkmapview,mapkit,cllocationmanager
There are two classes that help regarding map plotting and determining user location - MKMapView and CLLocationManager. MKMapView has a delegate “didUpdateUserLocation” that tells the user’s current location. At the same time, CLLocationManger has a delegate “didUpdateToLocation” and it also does the same thing. My question is when to use...

Smooth MKPolyline to follow the road

ios,xcode,swift,mapkit,mkpolyline
I know this has been asked before a few years back, but all the answers involved using Google Maps API to solve this. I wonder if there is a proper way to solve this now that iOS8 is out and it brought many improvements to native MapKit. Basically I draw...