mapkit

iOS Custom Annotation: A view below the annotation pin

天大地大妈咪最大 提交于 2019-11-28 01:42:49
问题 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 need to place an image view in the white space which you can see in the image in circular form, next I also need to add a view which contains a label on which I can set any text like me, friends, etc... So, for this I

How can I clear MKMapView's cache of map tiles?

混江龙づ霸主 提交于 2019-11-28 00:45:56
问题 I am working on an MKMapView based iPhone / iPad mapping app that overlays my own basic base map to provide for some limited functionality even when users are offline and can not reach Google's map tile server. This functionality is working - but I am having a hard time testing it after each new build because I can't find a way to flush / reset the iOS map tile cache. The iOS cache even survives a power-cycle and reboot of the iOS device. Anywhere I have zoomed into in the past renders with

How to determine the correct altitude for an MKMapCamera focusing on an MKPolygon

我的梦境 提交于 2019-11-28 00:44:27
问题 I need to figure out how to set up MKMapSnapshotterOptions to take a snapshot of aerial/satellite imagery associated with a polygonal region of the earth. Filling out the 'region', 'scale', 'size', and 'mapType' properties are trivial, as I have an MKPolygon to work with. The tricky part is in setting the 'camera' -- in my particular case, I am using MKMapSnapshotter independently of the MKMapView (in fact, not even on the main thread). However, I would prefer to orient the snapshot so that

Should I be worried about rumors that Apple will stop using Google Maps in iOS6? [closed]

你离开我真会死。 提交于 2019-11-28 00:43:14
Almost every major news media outlet is reporting that Apple will stop using Google Maps services in iOS6. I don't think anyone really knows what exactly the changes are, when they will be rolled out, how Apple will implement them and if Google or Apple will start charging money for their services. As a result of these uncertainties, I am having trouble making a sound decision on whether I should or should not release a new public bus tracker app that I have been working on for over a year now. I have had the initial hard deadline set for June 15, 2012. I know that the best thing to do is to

iOS app doesn't ask for location permission

与世无争的帅哥 提交于 2019-11-28 00:31:16
问题 My Swift-iOS app is meant to show the user's location on a map. However, the XCode debug console tells me I need to ask permission to show the user's location. I think, I do that but the dialog never comes up. Here is the error message, and below the ViewController where I call CLLocationManager::requestWhenInUseAuthorization() Error: 2014-06-30 21:25:13.927 RowingTracker2[17642:1608253] Trying to start MapKit location updates without prompting for location authorization. Must call -

Warning in Custom Map Annotations iPhone

*爱你&永不变心* 提交于 2019-11-27 23:11:30
I am using a custom map annotation class for map view in iPhone. Whenever I pop my map view from navigation bar stack I usually see some warnings in console. MapAnnotation was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info: I am not using KVO in my code hence not able to understand why I am receiving these warnings Latitude and Longitude have differing bounds: (-90, 90) for Lat

iOS Mapkit Custom Callout

佐手、 提交于 2019-11-27 22:27:13
Here's a sample custom callout that I'd want to get a similar style of. I was thinking of inheriting from MKAnnotation but I'm lost how to start it and I don't know if the callout's design could be overridden. Any ideas how to implement this custom callout with ui controls inside? EDIT: Here's my code from following the similar StackOverflow answer: - (MKAnnotationView *)mapView:(MKMapView *)mapview viewForAnnotation:(id <MKAnnotation>)annotation { if ([annotation isKindOfClass:[MKUserLocation class]]) return nil; static NSString* AnnotationIdentifier = @"AnnotationIdentifier";

move animation with custom annotation IOS Swift Like Ola Uber App MapKit

前提是你 提交于 2019-11-27 21:57:29
问题 **Here the car image where I want to only rotate car icon.** In my app I'm receiving location from server in every 10 seconds so I want to animate my custom annotation with animation from one point to another point. I want to move annotation with MapKit in iOS Swift 3 how to give the move animation from one location to another. I sending my viewController class code please read carefully and help me to get out from this thanks Here I am Adding custom annotation var point : MyCustomAnnotation?

Showing Specific Region Using MapKit

最后都变了- 提交于 2019-11-27 21:41:07
I want to know is it possible to show only specific region on map not the full world map using Map Kit. Like if i want to show Asia map in my application then map kit hides remaining part of the map. To handle the "map kit hides remaining part of the map" requirement, one thing you can do is create a black polygon overlay that covers the whole world with a cutout over Asia (or wherever you like). For example, where you initialize the map (eg. in viewDidLoad): CLLocationCoordinate2D asiaCoords[4] = { {55,60}, {55,150}, {0,150}, {0,60} }; //change or add coordinates (and update count below) as

How do I add custom pins to the iPhone MapKit?

删除回忆录丶 提交于 2019-11-27 21:22:14
I'm testing out the MapKit framework on the iPhone and would really much like to switch the standard pin that displays a location to an image called "location.png". How can I modify my code to allow that? Maincontroller - (void)viewDidLoad { [super viewDidLoad]; // // Set the map center // CLLocationCoordinate2D coordinate; coordinate.latitude = 49.2802; coordinate.longitude = -123.1182; mapView.region = MKCoordinateRegionMakeWithDistance(coordinate, 2000, 2000); // // Set 10 random locations on the map for testing purposes // for(int i = 0; i < 10; i++) { CGFloat latDelta = rand()*.035/RAND