mapkit

How to draw routes on maps in ios 6?

白昼怎懂夜的黑 提交于 2019-12-21 21:06:06
问题 I want to show maps & draw routes on maps. My application supports for ios 4 plus. So how should i use maps to work on ios 6 as well as before. Also i want to know sholud i use custom mapview in my app to display maps & routes or should i use [[UIApplication sharedApplication] openURL:] I have never user MapKits . So please provide if any tutorial. Also let me know if there are any rd party libraries that can be used. 回答1: If you don't want an in-app map. Use the following: NSString

Trouble converting MapKit user coordinates to screen coordinates

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 20:55:55
问题 OK this is actually three distinct questions in one thread: 1) I'm using: - (void)viewDidLoad { [super viewDidLoad]; [mapView setFrame :CGRectMake(-100,-100,520,520)]; [mapView setAutoresizesSubviews:true]; mapView.showsUserLocation = YES; locManager = [[CLLocationManager alloc] init]; locManager.delegate = self; [locManager startUpdatingLocation]; [locManager startUpdatingHeading]; [bt_toolbar setEnabled:YES]; } - (IBAction) CreatePicture { CLLocationCoordinate2D coord =

Making map pins spread out from a cluster

偶尔善良 提交于 2019-12-21 20:39:17
问题 I've got two custom annotation classes for my map: one for a single post tied to a location, and one for a cluster of those posts. The cluster stores pointers to all of the posts it contains, as well as a central lat/long location (calculated using the locations of the posts it contains). I have the behaviour that when I click on a cluster annotation it removes the cluster and adds its posts to the map. What I want is to change the pin-drop annotation when expanding the clusters to an

IOS6 Mapkit licensing, terms of use [closed]

淺唱寂寞╮ 提交于 2019-12-21 20:37:20
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . In IOS6 map data was replaced from Google to Apple's own map data. In the past, when MapKit was used you had to accept Google Maps licensing and terms of use (https://developers.google.com/maps/iphone/terms). What is the situation with the new MapKit and its new map data? E.g. GoogleMaps was not enabled to use

MKMapItem placemark is unavailable in swift

孤人 提交于 2019-12-21 19:38:09
问题 I am currently trying to make a searchbar that autopopulates with locations as the user types. I am using a MKLocalSearch to get a MKLocalSearchResponse and it appears to return values I can use. However to get the name, address or coordinates out of the search needs access to the MKPlacemark property in the search response. When I access the placemark I get the error: 'placemark' is unavailable: APIs deprecated as of iOS7 and earlier are unavailable in Swift var request =

MapKit - Make route line follow streets when map zoomed in

自古美人都是妖i 提交于 2019-12-21 17:46:51
问题 I wrote simple application which draws route between two locations on MapKit. I am using Google Map API. I used resources I found online and here's the code I am using to make request to Google: _httpClient = [AFHTTPClient clientWithBaseURL:[NSURL URLWithString:@"http://maps.googleapis.com/"]]; [_httpClient registerHTTPOperationClass: [AFJSONRequestOperation class]]; [_httpClient setDefaultHeader:@"Accept" value:@"application/json"]; NSMutableDictionary *parameters = [[NSMutableDictionary

Get center coordinates from MapKit and display in UILabel

情到浓时终转凉″ 提交于 2019-12-21 17:14:13
问题 I'm developing an iOS app using XCode 7.2 and Swift 2.1, and I've successfully implemented a MapKit map in my app. The map loads perfectly and centers on the user's current location. Now I want to retrieve the center coordinates should the user move the center of the map to a new location. This new location's coordinates will be "captured" on the press of a button (see the "Set Grid Reference" button in the attached gif) and be displayed in a label. Move from A to B and set new center

How to resolve the memory issue with Map on iOS 6

我们两清 提交于 2019-12-21 10:42:30
问题 I have created an app on iOS 6 in which I am showing the Map. The problem is there is a highly increase in memory allocation in just a simple interaction with the map i.e., on Pinch and Pan and dragging operations. I thought there may be some enhancements in the Mapkit in iOS 6 which I don't know so I tried the Sample Code of Raywenderlich but still I am facing the same issue. Please take a look on the image I have attached. I just dragged the map for sometime and there is an allocation of

MKMapView center and zoom in

馋奶兔 提交于 2019-12-21 10:05:22
问题 I am using MKMapView on a project and would like to center the map on a coordinate and zoom in. Just like Google maps has: GMSCameraPosition.camera(withLatitude: -33.8683, longitude: 151.2086, zoom: 6) Is there any Mapkit method for this? 回答1: You'd create a MKCoordinateRegion object and set that as the region on your MKMapView object. MKCoordinateRegion mapRegion; CLLocationCoordinate2D coordinate; coordinate.latitude = 0; coordinate.longitude = 0; mapRegion.center = coordinate; mapRegion

MKMapView not calling delegate methods

╄→гoц情女王★ 提交于 2019-12-21 09:14:01
问题 In a UIViewController I add a MKMapView to the view controlled by the controller. - (void)viewDidLoad { [super viewDidLoad]; CGRect rect = CGRectMake(0, 0, 460, 320); map = [[MKMapView alloc] initWithFrame:rect]; map.delegate = self; [self.view addSubview:map]; } Later in the controller I have - (void)mapViewDidFinishLoadingMap:(MKMapView *)mapView { NSLog(@"done."); } Done never gets printed. None of the other delegate methods get called either like mapView:viewForAnnotation: I use a