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
19
votes
5 answers

Allow tapping anywhere on an annotation callout without a callout accessory view

I have a map view that adds annotations more or less like this: - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id ) annotation { MKAnnotationView *annotationView = [[MKPinAnnotationView alloc]…
bdesham
  • 15,430
  • 13
  • 79
  • 123
19
votes
3 answers

Adding subview to MKMapView that's above the map but below the annotation views?

For an app I'm building, I have a custom "old map" effect PNG that I'd like to overlay on the MKMapView view. Unfortunately, neither way I've tried to do this is exactly right: Add a subview to the MKMapView (issue: the UIImageView for the PNG gets…
Zeppomedio
  • 5,911
  • 3
  • 18
  • 18
19
votes
3 answers

MKMapView: Get clicked event on annotation pin

I am using an MKMapView containing a couple of MKAnnotation pins. Above the map I am showing a UITableView with detailed information of the MKAnnotation pins. My problem: When I select a pin, I would like to select the corresponding table cell. For…
squeezer123
  • 191
  • 1
  • 1
  • 5
19
votes
4 answers

HowTo initialise MKMapView with a given user location?

My app knows the current user position (CoreLocation.framework). As soon as the user opens a new MapView his iPhone starts searching for the current position again. Is it possible to skip that or to change the first user position for…
jantimon
  • 36,840
  • 23
  • 122
  • 185
18
votes
9 answers

iPhone MKMapView Annotation Clustering

I've got quite a lot of pins to put on my map so I think it would be a nice idea to cluster those annotations. I'm not really sure how to achieve this on iPhone, I was able to work something out with google maps and some javascript examples. But…
haluzak
  • 1,133
  • 3
  • 17
  • 31
18
votes
6 answers

MKMapview place pin at location (long/lat)

I have latitude and long values and I need to be able to drop a pin at this location. Can anybody provide some advice on how to go about this?
3sl
  • 295
  • 2
  • 4
  • 7
18
votes
2 answers

Swift MKMapView Drop a Pin Annotation to Current Location

I am looking to be able to ask the app user for his/her current location and a pin to be automatically dropped on that location. Here is my code for grabbing the current location, but I am having trouble understanding how I can drop a pin for the…
Kevin
  • 1,189
  • 2
  • 17
  • 44
18
votes
4 answers

How do I drop a pin with MapKit?

I would like to allow the user of my app to pick a location in the map. The native map has a "drop pin" feature where you can locate something by dropping a pin. How can I do this in MapKit?
erotsppa
  • 14,248
  • 33
  • 123
  • 181
18
votes
1 answer

Programmatically rotating a MKMapView in iOS7

I have an app that currently uses CGAffineTransformMakeRotation to manipulate a MKMapView in order to display the map with the correct orientation and size. With the release of iOS7 this method has become unreliable (map center keeps shifting). I…
Andrin
  • 425
  • 1
  • 4
  • 15
18
votes
5 answers

Force MKMapView viewForAnnotation to update

So I have a MKMapView with all my pins added, and the colour of the pin is dependent on whether a value is set for that pin. When I first load the app, viewForAnnotation is called and the colours are set accordingly. However, when I update the pin's…
ingh.am
  • 25,981
  • 43
  • 130
  • 177
17
votes
1 answer

handling location permissions instantaneously in swift

I am trying to implement a basic map view and add a user's current location to the map as an annotation. I have added the requestwheninuse key to my info.plist and imported coreLocation. In my view controller's did load method, I have the…
user2363025
  • 6,365
  • 19
  • 48
  • 89
17
votes
4 answers

Current location button on ios MKMapView

I am using MKMapView in my iOS Application. I have search bar in my view. If I search for location on map, I am putting annotation on that searched location. Now the issue is, I want to go back to my current location. I have seen Google Maps…
Rakesh
  • 1,177
  • 1
  • 15
  • 31
17
votes
1 answer

MKMapView and CLLocationManager

I want to use a MKMapView to display the user current location using the default breathing blue pin and I want to record the user movement at the same time. Is there any way that I could use the GPS manager (not sure if this is a CLLocationManager)…
Patrice
  • 183
  • 1
  • 6
17
votes
6 answers

How can I reduce the number of annotations on a map?

I'm coding a map view with around 900 annotations. Having this many annotations on a map make the performance suffer, so I'd like to reduce it to about 300 at a time. The annotations are representing shops in a country, so they tend to cluster a lot…
nevan king
  • 112,709
  • 45
  • 203
  • 241
17
votes
4 answers

'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named MKMapView'

I am doing a project using storyboard(first time using story board).In one of the viewcontroller there is a view with a mapview and a tableview containing prototype cells.I have included the mapkit framework and mapkit headers are imported in the…
sujith1406
  • 2,822
  • 6
  • 40
  • 60