mapkit

How I can solve Terminated due to Memory Error

时光怂恿深爱的人放手 提交于 2019-12-22 06:23:05
问题 I am using MKMapView in my big project . when I load a lot annotation (over 700) and I draw line between those points on MapKit , I am getting xcode error message "Terminated due to memory error" and app is crashing . you can see on image: . I am adding line like this : if I have less than 700 annotation , it's working very well . I am thinking it's have some memory problem . How can I solve this problem ?any advice . // adding annodation for (int i=0; i<[fetcher.locations count]; i++)/

How can I customize the title/subtitle font in callout from MKAnnotationView or just hide them?

♀尐吖头ヾ 提交于 2019-12-22 06:01:23
问题 I have a view to a calloutDetail: annotationView.detailCalloutAccessoryView = mapInformationView.view It is working just fine, but I don't want to display a title/subtitle, just my custom view. But when I left title/subtitle empty the callout isn't displayed. So, How can I hide them or just change their font size and name? 来源: https://stackoverflow.com/questions/33847133/how-can-i-customize-the-title-subtitle-font-in-callout-from-mkannotationview-or

How can I customize the title/subtitle font in callout from MKAnnotationView or just hide them?

可紊 提交于 2019-12-22 06:01:13
问题 I have a view to a calloutDetail: annotationView.detailCalloutAccessoryView = mapInformationView.view It is working just fine, but I don't want to display a title/subtitle, just my custom view. But when I left title/subtitle empty the callout isn't displayed. So, How can I hide them or just change their font size and name? 来源: https://stackoverflow.com/questions/33847133/how-can-i-customize-the-title-subtitle-font-in-callout-from-mkannotationview-or

Zoom to fit current location and annotation on map

笑着哭i 提交于 2019-12-22 03:44:31
问题 I am new to swift (iOS programming in general) and am trying to figure out how to zoom a map out to fit 2 points on the map. Currently I have var zoomRect = MKMapRectNull; var myLocationPointRect = MKMapRectMake(myLocation.longitude, myLocation.latitude, 0, 0) var currentDestinationPointRect = MKMapRectMake(currentDestination.longitude, currentDestination.latitude, 0, 0) zoomRect = myLocationPointRect; zoomRect = MKMapRectUnion(zoomRect, currentDestinationPointRect); Which does nothing. Do I

Reposition legal label ( MKAttributionLabel )

爷,独闯天下 提交于 2019-12-22 02:00:42
问题 I'd want to move the Legal label to the right side. On iOS 6 and 7 the below solution was working fine, however on iOS 8.3 it seems to not work. I get the label, then with a timer (0.1 sec) in viewDidLayoutSubviews I call this method : -(void)moveLegalLabel { UIView * legalLink = [self attributionView]; legalLink.frame = CGRectMake(self.mapView.frame.size.width - legalLink.frame.size.width - 10, self.mapView.frame.size.height - legalLink.frame.size.height - 10 , legalLink.frame.size.width,

iPhone - Image overlay MapKit framework?

折月煮酒 提交于 2019-12-22 01:14:28
问题 I can see with iOS4 you can now tile an image on google maps (Been looking at the TileMap example from apple). This is great as this is what I want to do, but from what I can see I need to know the GEO reference of the image so I can raster the images with the appropriate zoom levels, etc. What I have is an artist image, which is a map of a specific area and I want to overlay this image on google maps. Am I missing something here, but can this be done with a none standard map and having

Offline reverse geocoding on iOS

跟風遠走 提交于 2019-12-22 01:04:06
问题 There are lots of existing questions relating to this issue, but I have looked at as many of them as I could find and did not get an answer. I'm trying to perform an offline reverse geocoding lookup on iOS based on a latitude and longitude. I'd like to be able to provide a latitude and longitude, and be provided with the country in which that point lies. I can do this with Geonames (such as: http://api.geonames.org/countryCode?lat=45.03&lng=8.2&username=demo), but I need a similar ability

Searching a TableView of annotations

孤人 提交于 2019-12-21 23:56:05
问题 I had no idea how to set up a database when i started so i have 80 annotations that all look like this workingCoordinate.latitude = 50.795825; workingCoordinate.longitude = -1.103139; MainViewAnnotation *Levant = [[MainViewAnnotation alloc] initWithCoordinate:workingCoordinate]; [Levant setTitle:@"Levant"]; [Levant setSubtitle:@"Unit R09, Gunwharf Quays"]; [Levant setAnnotationType:MainViewAnnotationTypePortsmouth]; [mapView addAnnotation:Levant]; They are grouped into 22 cities through the

Add Custom Property to MKAnnotation

廉价感情. 提交于 2019-12-21 23:54:17
问题 I am trying to add a custom value to my MKAnnotation. I would like to have it store the unique ID of the location. My code for setting up the annotation with a title and subtitle works like this: location.latitude = [dictionary[@"placeLatitude"] doubleValue]; location.longitude = [dictionary[@"placeLongitude"] doubleValue]; newAnnotation = [[MapViewAnnotation alloc] initWithTitle:dictionary[@"placeName"] andCoordinate:location]; newAnnotation.subtitle = dictionary[@"placeCity"]; How would I

MapKit Annotations and User location

半世苍凉 提交于 2019-12-21 21:29:21
问题 I followed this tutorial to make my first app: http://icodeblog.com/2009/12/21/introduction-to-mapkit-in-iphone-os-3-0/ I would really like to know how to sort the annotations in the Table in order of distance to the user (the nearest annotation is the first one on the table) How is it possible to do that? I understand that I must use the CLLocation to find the user's location but then I have no idea. Could any one help me? Cheers, Thank you in advance for your much appreciated help, EDIT: I