mkmapview

MKMapView regionWillChangeAnimated Zoom or Pan?

I need to know whether a regionWillChangeAnimated occurred due to zooming or panning. I was able to figure this out for regionDidChangeAnimated by keeping track of the old region span and comparing with the new one to see if a zoom occurred. The problem with regionWillChangeAnimated is that it is called before the region changes so I...

MKMapView Annotation Callout Button to DetailView?

Hi, I have annotations in a MKMapView with Callouts. In this Callouts there's a "Right-Arrow" Button. When clicking on it, I want to open a Detail View, an extra UIViewController with its own nib file etc. I use following code: In my MapViewController: - (void)showDetails:(id)sender { // the detail view does not want a toolbar so...

Custom MKMapView annotation display is not showing User Location

I have an application with a flipside view and a main view. The main view copies information contained in an array from the application delegate, and pushes the useful information into a for loop which then takes the name, GPS coords, and other identifying information and passes that into a series of methods and classes which result in a...

How to get the title and subtitle for a pin when we are implementing the MKAnnotation?

I have implemented the MKAnnotation as below. I will put a lot of pins and the information for each of those pins are stored in an array. Each member of this array is an object whose properties will give the values for the title and subtitle of the pin. Each object corresponds to a pin. But how can I display these values for the pin when...

Crash on replacing map annotations

Solved it, see below code I'm trying to replace annotations on my MapView depending on the distance between user location and annotation. The annotations are getting replaced like they should, but when I touch te mapview my app crashes. This is de code I have so far: NSMutableArray *tempArray = [[NSMutableArray alloc] init]; for (...

Find distance between two points using MKMapKit

Hi, I'm attempting to find the euclidean distance in meters between two points on an MKMapView using iPhone OS 3.2. The problem is that I have these coordinates in terms of latitude and longitude, which, mathematically provides me enough data to find the distance, but it's going to take some tricky trigonometry. Is there any simpler sol...

Double clicking on map annotations

I want to zoom in on an annotation after double clicking on it, but I cant seem to find a method in the developer documentation that does this, So how do I zoom in on a double clicked annotation? ...

Current Location with custom annotation, call-out and blue accuracy circle

Hi, After 2 hours of googling I couldn't find an answer so this is my last shot. I would like to use a custom annotation for the user current location on a mkmapview. But I also want to have the blue accuracy circle around it. Can this be done? If not, can I add a call-out to the default blue dot with circle? The reason that I nee...

Get the coordinates of a point from mkmapview on iphone

Im trying to figure out how to put an annotation on a map based on where the user touches. I have tried subclassing the MKMapView and looked for the touchesBegan to fire but as it turns out, MKMapView does not use the standard touches methods. I also have tried subclassing a UIView, adding an MKMapView as a child and then listening fo...

iPhone: Can't get mapkit custom annotation image to work

I 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: Annotation *anno = [[[Annotation alloc] init] autorelease]; anno.coordinate = ridesMap.userLocation.location.coordinate; anno.title = @"Current Loca...

track MKMapView networking connection?

Hi all, is it possible to know when the map has fully loaded all of its data (I know u can with other connections) and then perform some action? Basically I want to do a task only if and when the map has fully loaded and not with the grey squares that show with poor network signal? Many thanks Jules ...

How to show directions to neares places from current location using MKMapView

I am new to using MapKit on iPhone. On Google Maps, I have a current location and push pins to indicate nearest places around current location. (The co-ordinates of all are hard-coded as on now). Now, How to do the following: 1. Display a green arrow (right/left arrow) pointing to the nearest push pin location from current location? 2....

Why is leftCalloutAccessoryView(image) of my MKAnnotation having its bottom cut in certain annotations?

I have subclassed my MKAnnotation and its working perfectly in all otherways - showing title, subtitle, pop-up and leftCalloutAccessoryView image also. Only problem is that when i take some of the annotations, ie, when they gives the popup showing all the details, the image that i have used in the leftCalloutAccessoryView is getting slig...

MKMapView ignores update of centerOffset in iOS 4

I previously created a custom callout bubble as a subview to the MKAnnotationView because the built in callout is so limited. This requires me to change to centerOffset of the MKAnnotationView when it is selected to account for the size of the callout bubble. This all worked perfectly before iOS 4 came out. Now, with iOS 4, it complet...

How can we change the color of the callout that comes when we press a pin in MKMapView?

The callout that is being displayed when we press an MKAnnotationPin can be customised to have image, title and also subtitle. Is it possible to change the blackcolor of the callout to some other color, say brown? ...

MK MapView on iPhone App

The app I am developing uses a tab bar with a Map View. The problem is the tab bar blocks out the Google Maps logo at the bottom left hand corner. How do I set the height and width of the Map View to ensure that the Google logo is visible? I've tried adjusting the Map View on IB but the size doesn't seem to change as the logo is still bl...

MKMapView cached tiles

Hi all, I need to clear the cached tiles stored by the device every time I load a new region does anyone know how to do this? Many thanks Jules ...

Custom Annotation View's image does not appear on device build in MKMapView

I am using the iphone sdk and trying to use a custom image for my AnnotationView on my MKMapView. My approach works fine for another screen in my app, but for the problematic one, I see the image in the simulator but not on the device. I basically create a custom view like this: @implementation CustomAnnotationView - (id) initWithAnn...

How to get center of an MKMapView map?

I have an MKMapView which allows the user to scroll the map around. Later, I want to get the latitude and longitude of the point at the center of the map, but can't find an easy way to do it. At the moment I'm trying something like: CLLocationCoordinate2D centre = [locationMap convertPoint:locationMap.center toCoordinateFromView:locatio...

MKMapView didUpdateUserLocation not updating.

I have application with map and want to zoom to the current location, when it's updated. I use - (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation delegate method to know when user location was updated. Now on simulator method is being called as it should. But when i test it on device (iphone 2g) t...