apple-maps

custom annotation apple mapkit

别说谁变了你拦得住时间么 提交于 2019-11-28 11:32:55
问题 I am trying to assign two custom annotations, one called "arsenal.png" and one called "chelsea.png" Using apple mapkit framework, xcode 7. Need assistance with code to achieve the customized markers. here is my implementation file: // TrucksViewController.m #import "TrucksViewController.h" #import "Annotation.h" @interface TrucksViewController () @end //Wimbledon Coordinates #define WIMB_LATITUDE 51.434783; #define WIMB_LONGITUDE -0.213428; //Stadium Coordinates #define ARSENAL_LATITUDE 51

Opens apple maps app from ios app with directions

回眸只為那壹抹淺笑 提交于 2019-11-28 06:27:28
As the title states I would like to open the native maps app in the ios device from within my own app, by pressing a button. currently I have used an MKmapview that displays a simple pin with lat/long taken from a json file. the code is this : - (void)viewDidLoad { [super viewDidLoad]; } // We are delegate for map view self.mapView.delegate = self; // Set title self.title = self.location.title; // set texts... self.placeLabel.text = self.location.place; self.telephoneLabel.text = self.location.telephone; self.urlLabel.text = self.location.url; **// Make a map annotation for a pin from the

Repeating pin annotation on map

一笑奈何 提交于 2019-11-28 06:00:28
问题 I have just started learning Swift. Question: When I touch on map to place the pin annotation and drag my finger it creates repeating line of annotation. import UIKit import MapKit import CoreLocation class ViewController: UIViewController, CLLocationManagerDelegate, MKMapViewDelegate { @IBOutlet weak var map: MKMapView! var manager:CLLocationManager! override func viewDidLoad() { super.viewDidLoad() //Manager for current location manager = CLLocationManager() manager.delegate = self manager

is there a way to get directions in mkmapview using a built in apple API?

心不动则不痛 提交于 2019-11-27 07:16:18
I know google maps are known to be the best maps out there, but i dont want to have to download a bunch of extra libraries and all that. I'd prefer to do something quick and simple to get a quick route from point A to B and be done with it. Is there a way to do this with built in functions/libraries? Can somebody point me in the right direction? EDIT I'm not trying to get turn by turn directions or anything in my case, i just want to draw a line from start to finish. maybe give options about which routes to take. Is there a way to do it or no? Kamaros In iOS 7, you can get and display

How to open maps App programmatically with coordinates in swift?

笑着哭i 提交于 2019-11-27 02:56:56
I have latitude and longitude that I want to open into my map application. I tried this code from HERE . func goToMap(){ var lat1 : NSString = self.venueLat var lng1 : NSString = self.venueLng var latitude:CLLocationDegrees = lat1.doubleValue var longitude:CLLocationDegrees = lng1.doubleValue var coordinate = CLLocationCoordinate2DMake(latitude, longitude) var placemark : MKPlacemark = MKPlacemark(coordinate: coordinate, addressDictionary:nil) var mapItem:MKMapItem = MKMapItem(placemark: placemark) mapItem.name = "Target location" let launchOptions:NSDictionary = NSDictionary(object:

Opens apple maps app from ios app with directions

谁说我不能喝 提交于 2019-11-27 01:20:49
问题 As the title states I would like to open the native maps app in the ios device from within my own app, by pressing a button. currently I have used an MKmapview that displays a simple pin with lat/long taken from a json file. the code is this : - (void)viewDidLoad { [super viewDidLoad]; } // We are delegate for map view self.mapView.delegate = self; // Set title self.title = self.location.title; // set texts... self.placeLabel.text = self.location.place; self.telephoneLabel.text = self

is there a way to get directions in mkmapview using a built in apple API?

纵然是瞬间 提交于 2019-11-26 13:08:54
问题 I know google maps are known to be the best maps out there, but i dont want to have to download a bunch of extra libraries and all that. I\'d prefer to do something quick and simple to get a quick route from point A to B and be done with it. Is there a way to do this with built in functions/libraries? Can somebody point me in the right direction? EDIT I\'m not trying to get turn by turn directions or anything in my case, i just want to draw a line from start to finish. maybe give options

How to open maps App programmatically with coordinates in swift?

大城市里の小女人 提交于 2019-11-26 12:35:51
问题 I have latitude and longitude that I want to open into my map application. I tried this code from HERE. func goToMap(){ var lat1 : NSString = self.venueLat var lng1 : NSString = self.venueLng var latitude:CLLocationDegrees = lat1.doubleValue var longitude:CLLocationDegrees = lng1.doubleValue var coordinate = CLLocationCoordinate2DMake(latitude, longitude) var placemark : MKPlacemark = MKPlacemark(coordinate: coordinate, addressDictionary:nil) var mapItem:MKMapItem = MKMapItem(placemark: