mapkit

selectAnnotation after removing then re-addingAnnotation

Hey all, I got somewhat of a dense question about the mapKit for the iPhone. I'm using the MapKit framework and what I'm trying to do is basically click a pin, reload it and then show it's callOut after it has been added again. This is the code I'm trying to get to work.. -(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(M...

get coordinates on tap in iphone application.

Hi, I am create a iphone Mapkit application. I want to get the coordinates where the user has tapped on the map screen. Best Regards, Naveed Rafi ...

CLlocation Getting best results Iphone

Hello, I'm trying to make a query based on the user location. The thing is that I can only query upon the first location result, with the lat/lon result as the query parameter. How do I make sure I get the best result of a user location and then execute the sqlite query? Thanks in advance! ...

Mapkit showing annotation region

Hi, I have a MKMapView with several annotations. These annotations differ from varios location all over Sweden. What I want to do is to zoom the map so all annotations show. I do not want to position the map to my position (although I do want to show it), but want all annotations to show and center the map according those locations. I...

Mapkit with multiple annotations

Hi All, I have a map displaying multiple annotations. I'd like to mimic the behavior of the Places tab on the Photos built-in app (iOS 4), where the annotations are automatically joined together or splited apart as the user changes the zoom level. How do I do that? Thanks! ...

Why is MKMapView putting me in the sea?

I have this code to set the map at the user's location: MKCoordinateSpan span; span.latitudeDelta=0.2; span.longitudeDelta=0.2; CLLocationCoordinate2D location=mapView.userLocation.coordinate; location = mapView.userLocation.location.coordinate; MKCoordinateRegion region; region.span=span; region.center=location; [mapView setRegion:...

MapKit problems with annotations

Hi there Ok, so I've got some issues with my MapKit annotations. First of all, I want a callout for each annotation. I can't find out how to do this at all! :( I have two NSStrings (name of the place and a short description). Then I need to be able to log the click on the callout - so I can launch a disclosure view. Secondly I want to...

MapKit setRegion and addAnnotations crashes in 3.1.2 devices

Hi, I am using MapKit in my app and i find that the setRegion and addAnnotations methods crashes my app. But i am sure that its something wrong with by project settings or flags as by another MapKit app is running fine on the same devices. Is it something wrong with my flags? I am using a library and using -all_load in linker flags. M...

Subclassing MKAnnotationView and overriding setDragState

Hi all This is about an iPhone App using MKMapKit: I created a custom MKAnnotationView for a draggable Annotation. I want to create a custom animation. I set a custom pin image and the annotation is draggable (which both is not shown here, it happens in the mapview) with the following code: - (void) movePinUpFinished { [super se...

addAnnotations in MapKit causing iPhone app to crash

So my app uses MapKit, and many of the people who have downloaded my app are complaining that it crashes right after the map loads. I can assume that its crashing once the annotations are being displayed on the map. I have no history of crashes in my itunes connect crash logs (should i??), but they posted in a review that they're using...

CG, lines are not being drawn on an MKMapView

I'm trying to draw some lines onto a MKMapView like in this example. But somehow the lines are not being drawn in my iPad app though it's pretty much the same as in the example. Are there some kind of common pitfalls I should think about? It's been driving me nuts for the last two days. Thanks –f ...

Extended mapView:viewForAnnotation Now No Blue Dot

I have extended MapKit's ability to draw custom annotation images with the following code: - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation{ NSLog(@"Drawing a cloud on the map"); MKAnnotationView *view; if(annotation != mapView.userLocation){ view=[[MKAnnotationView alloc] initWithAn...

Google Maps curl animation in MKMapView / Map Kit on iOS4

Hi folks.. Anyone know whether (and if so, how) we can create the half-turned page effect Google Maps on the iPad uses to show the options to change the Map type?.. See below image to see what I'm talkin' about.. http://picasaweb.google.com/103912402546181867188/WebPics#5516711523655880386 Incidentally, any pretty good Map Kit tutoria...

IBoutlet MapKit crashing Tab Bar Controller Application

Hello, I've been trying to make a tab bar application that needs a tab with a Map. Pretty simple. Well, when I add an IBOutlet to it, the application crashes indicating an: * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key...

Colouring Pins on a Map

Hello, I'm trying to mark a starting pin and ending pin on my map with different colours. Maybe the starting pin in green and the ending pin in red. My code below, reads the latitude / longitude coordinates from core data and loops around placing a red pin for each object found in core data. MapPin.h #import <Foundation/Foundation.h...

Limiting mapkit region on iPad

I need to have an iPad app show a given country with some anotations using mapkit. Is it possible to limit it so the user can not scroll over to another region than the one i want to show? For example, my app wants to show stuff about Brazil, can i make it so the user can not move away from that country? This question is regarding Mapk...

Draw round-corner box

Hi, In my application I have a map, this map has a lot of annotations... but sometimes no location is found for an annotation (server couldn't find lat/lon). When this happens, I would like to draw a little box on my map with the text "Some locations could not be found" (or similar). I want this box to have round corners and to be trans...

Points of Interest API / Webservice

I have a requirement to show points of interest on a map within an iPhone app I am working on. I'm using MapKit to display the maps and get the users location. I've been unable to find a suitable webservice to retrieve places or points of interest (restaurants, shops, hotels, etc) to display on the map. I know it can be done, because ...

Looking up address using mapkit and searchbar

Hi, I am trying to make an app similar to the Maps of the iPhone. I want to use the Mapkit and a searchbar to look up an address. And then use the address to add it to my tableview But I have actually no idea how to do this. Does someone have a clue for me? A tutorial or an example? thanks in advance ====================== Right now ...

Hiding an MKPolylineView causes blurring rather then hiding.

I use MKPolylineview to show a route on a map. I have two buttons, one to display the route, one to hide the route. On an iPhone with ios 4.0.2 the route hides and displays perfectly fine when I click the buttons. On an iPhone with ios 4.1 installed the route displays fine. When I click the button to hide the route the line expands in...