Questions tagged [mkmapview]

MKMapView is part of Apple's MapKit framework for developing location-aware iOS applications, and provides an embeddable map interface. Effective iOS 6, the MapKit framework uses Apple's own map service. In iOS 5.1 and earlier, the framework uses the Google Mobile Maps service.

MKMapView is part of Apple's MapKit framework for developing iOS applications, and provides an embeddable map interface. Effective iOS 6, the MapKit framework uses Apple's own maps service. In iOS 5.1 and earlier, the MapKit framework used the Google Mobile Maps service, as described in the MKMapView Class Reference:

Important: In iOS 5.1 and earlier, the MapKit framework uses the Google Mobile Maps (GMM) service to provide map data. Use of specific classes of this framework (and their associated interfaces) is subject to the Google Mobile Maps terms of service. You can find these terms of service at https://web.archive.org/web/20120225140619/http://code.google.com/apis/maps/iphone/terms.html.

References:

4988 questions
201
votes
26 answers

Zooming MKMapView to fit annotation pins?

I am using MKMapView and have added a number of annotation pins to the map about a 5-10 kilometre area. When I run the application my map starts zoomed out to show the whole world, what is the best way to zoom the map so the pins fit the…
fuzzygoat
  • 26,573
  • 48
  • 165
  • 294
166
votes
9 answers

Could not instantiate class named MKMapView

I may be doing something really stupid here as I've done it before and it worked and now... Created a new iPad project, in the details view I added a MKMapView, added the MapKit.framework to the project, added the property / etc. to the header. Go…
tg2
  • 2,190
  • 3
  • 14
  • 21
156
votes
9 answers

How to pinch out in iOS simulator when map view is only a portion of the screen?

I have a view on the iPad that I'm adding an MKMapView to that is say half the height of the full screen. However, when I try to pinch out on the iOS Simulator it doesn't work since the to nubs fill the entire iPad view on the simulator. And so,…
Christopher
  • 5,806
  • 7
  • 31
  • 41
106
votes
10 answers

How to delete all Annotations on a MKMapView

Is there a simple way to delete all the annotations on a map without iterating through all the displayed annotations in Objective-c?
kevin Mendoza
  • 1,211
  • 2
  • 12
  • 16
97
votes
15 answers

How to intercept touches events on a MKMapView or UIWebView objects?

I'm not sure what I am doing wrong but I try to catch touches on a MKMapView object. I subclassed it by creating the following class : #import #import @interface MapViewWithTouches : MKMapView { } - (void)…
Martin
  • 2,290
  • 1
  • 23
  • 28
91
votes
19 answers

determine if MKMapView was dragged/moved

Is there a way to determine if a MKMapView was dragged around? I want to get the center location every time a user drags the map using CLLocationCoordinate2D centre = [locationMap centerCoordinate]; but I'd need a delegate method or something that…
hgbnerd
  • 1,090
  • 1
  • 10
  • 11
89
votes
9 answers

How to customize the callout bubble for MKAnnotationView?

I'm currently working with the mapkit and am stuck. I have a custom annotation view I am using, and I want to use the image property to display the point on the map with my own icon. I have this working fine. But what I would also like to do is to…
Zach
  • 1,194
  • 2
  • 11
  • 14
71
votes
7 answers

How to validate latitude and longitude

I have two UITextFields which users can enter in a latitude and longitude, these co-ordinates are then used to create a pin on an MKMapView. I want find a way to validate whether the values they enter are actual GPS co-ordinates or just a load of…
user843337
70
votes
6 answers

How do I zoom an MKMapView to the users current location without CLLocationManager?

With the MKMapView there's an option called "Show users current location" which will automatically show a users location on the map. I'd like to move and zoom to this location when it's found (and if it changes). The problem is, there doesn't appear…
Danny Tuppeny
  • 40,147
  • 24
  • 151
  • 275
66
votes
3 answers

MKMapView: Instead of Annotation Pin, a custom view

I want to display an image in my MKMapView instead of little rock pin. Can someone please put some helpful code here, or tell the way how to do it? -(MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation: (id )annotation { …
turtle
  • 928
  • 1
  • 11
  • 23
64
votes
8 answers

Draw a circle of 1000m radius around users location in MKMapView

(Using iOS 5 and Xcode 4.2) I have an MKMapView and want to draw a circle of 1000m radius around the user location. On the surface it would seem that implementing the mapView:viewForAnnotation: map view delegate method, and adding a custom…
Jon Cox
  • 10,622
  • 22
  • 78
  • 123
61
votes
6 answers

Quickly adding single pin to MKMapView?

I have a GPS coordinate (latitude, longitude) and I quickly want to place a single pin on a MKMapView showing that position. Everything works just fine, but as I only need a single pin with no callout is there a quicker way to do this or is what I…
fuzzygoat
  • 26,573
  • 48
  • 165
  • 294
59
votes
2 answers

How to add a push pin to a MKMapView(IOS) when touching?

I had to get the coordinate of a point where the user touch on a MKMapView. I'm not working with the Interface Builder. Can you give me one example?
Christophe Debove
  • 6,088
  • 20
  • 73
  • 124
56
votes
2 answers

Swift MKMapView Polygon Overlay glitching

In rare occasions, the overlay on my map (small blue dot) gets a weird glare (big blue area on right) (as seen in picture). Sometimes zooming in or out will fix it, but not always. Can't find anything on why this would happen. Is it something to do…
Steve
  • 1,121
  • 1
  • 12
  • 32
52
votes
12 answers

iOS6 MKMapView using a ton of memory, to the point of crashing the app, anyone else notice this?

Has anyone else, who's using maps in their iOS 6 apps, noticing extremely high memory use to the point of receiving memory warnings over and over to the point of crashing the app? I've ran the app through instruments and I'm not seeing any leaks and…
Jeremy Fox
  • 2,668
  • 1
  • 25
  • 26
1
2 3
99 100