mkmapview

Use GOOGLE maps in iOS supporting iOS 6 and also iOS 5

泪湿孤枕 提交于 2019-12-23 03:44:08
问题 I am in a need of having maps support for an app, but the concern is prior to ios 6 the iOS mapKit uses the google maps which is rich in content, but in iOS 6 its using its own maps which is not that rich in content. I have search for the Google API for ios 6, which is great but I need to support prior to ios 6 also. Please help. 回答1: The new Google Maps SDK for iOS supports back to iOS 5.1, see here: https://developers.google.com/maps/documentation/ios/intro#supported_platforms 来源: https:/

iOS driving directions in iOS6

最后都变了- 提交于 2019-12-23 03:14:53
问题 I have been searching all around about how to integrate driving directions into MKMapView within my application. Is the only way to open the Apple Maps program and go from there, or is their a way of integrating within your own app. If not, I will probably go with google maps as soon as I can get an API key. 回答1: If you mean getting the same views for driving direction (a.k.a. turn-by-turn navigation) as the Apple Maps application, then no... as far as I know, there is no library for that (if

showsUserLocation does not display blue dot in iPhone 4.0

核能气质少年 提交于 2019-12-23 02:52:11
问题 So, I've created a CLLocationManager, called it to start updating, set mapView.showsUserLocation to YES, and returned nil for the userLocation annotation. Here are some snippets from my code in my UIMapViewController: - (void)viewDidLoad { CLLocationManager *locationManager = [[CLLocationManager alloc] init]; [locationManager startUpdatingLocation]; } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {

Routing, polylines in iPhone Google Maps

落爺英雄遲暮 提交于 2019-12-23 01:42:14
问题 In our iPhone app we need to draw a route on Google Maps (GMaps is the only option, we can't consider other maps). We draw the route while the user walks around - GPS tracking basically. Then we display all saved routes on the map. The problem is that Google Maps is almost unusable. It is impossible to scroll the map, zoom it (everything is extremely slow). Now we draw the route on a transparent layer [UIColor clearColor] in the method - (void)drawRect:(CGRect)rect which is called using [

How to recenter map in iPhone app on zoom in/out using MKMapView

妖精的绣舞 提交于 2019-12-22 19:03:13
问题 I am developing an iPhone application in which I need to show an image at a specific Latitude & Longitude on a Map. The requirement is - Even if the user zooms in or out on this map screen, the map control should automatically center itself after the zoom, to the same Lat & Long. I am using MKMapView. I have tried to go through all available documentation. However, I could not come across any callback or other method that will allow me to achieve the objective. One alternative is to handle

How to recenter map in iPhone app on zoom in/out using MKMapView

泄露秘密 提交于 2019-12-22 19:01:30
问题 I am developing an iPhone application in which I need to show an image at a specific Latitude & Longitude on a Map. The requirement is - Even if the user zooms in or out on this map screen, the map control should automatically center itself after the zoom, to the same Lat & Long. I am using MKMapView. I have tried to go through all available documentation. However, I could not come across any callback or other method that will allow me to achieve the objective. One alternative is to handle

iOS : Why can't I get mapkit to display a custom annotation pin image?

一曲冷凌霜 提交于 2019-12-22 13:56:31
问题 figured that using my own custom pin image for annotations would be super easy. But I have never been able to get it to work, and I have no idea why! I am simply using: - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation { if([annotation isKindOfClass:[MKUserLocation class]]) return nil; NSString *annotationIdentifier = @"CustomViewAnnotation"; CustomAnnotationView * customAnnotationView = (CustomAnnotationView *) [self.mapview

Custom “Callouts” for MKPolyline

↘锁芯ラ 提交于 2019-12-22 11:33:12
问题 I have an app to which I display routes on a map as MKPolyline. I made my search but I was unable to find a sample code on how to display custom MKPolyline callouts as Apple does on the ios6 maps: Can some help me? Thank you in advance.. 回答1: This appears to be The definive solution at the moment http://navarra.ca/?p=786 from this Question drawing routes on MKMapView 来源: https://stackoverflow.com/questions/16122833/custom-callouts-for-mkpolyline

MKAnnotationView custom image is not shown

北城余情 提交于 2019-12-22 11:10:50
问题 I am trying to add a custom image instead of the regular pin on the map. But it remains a red pin... What am I missing? - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>) annotation{ static NSString* AnnotationIdentifier = @"AnnotationIdentifier"; MKPinAnnotationView *annView = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:AnnotationIdentifier]; annView.animatesDrop = TRUE; annView.image = [UIImage imageNamed:@"CustomPin.png"

Change MKMapType in MKMapView and keep custom pinImage for annotations

元气小坏坏 提交于 2019-12-22 10:29:49
问题 I have set a custom pinImage for my annotations and when I change the type to MKMapTypeHybrid it reverts the pinImage setting to the standard pins. I'm setting the mapType in my viewWillAppear method of the map view controller. I'm setting my pinImage for the annotations like so (shortened for clarity): - (MKAnnotationView *) mapView:(MKMapView *) mapView viewForAnnotation:(id ) annotation { MKPinAnnotationView *customAnnotationView=[[[MKPinAnnotationView alloc] initWithAnnotation:annotation