mkannotation

Is it possible to create a custom, animated MKAnnotationView?

I'm trying to simulate the user location animation in MapKit (where-by the user's position is represented by a pulsating blue dot). I've created a custom subclass of MKAnnotationView and in the drawRect method I'm attempting to cycle through a set of colors. Here's a simpler implementation of what I'm doing: - (void)drawRect:(CGRect)rec...

Iphone build error - literal-pointer symbol(s) not found

Sorry I imagine I'm missing something basic here. Before I write up a bunch of details on the specifics of the class I'd appreciate a nudge or smack on the head about the meaning of this build error. I have a subclass of NSObject SiteAnnotation that should be conforming to the MKAnnotation protocol. It is #imported in the ViewController...

UIPopOver from MKAnnotation callout

Hi all, i'm developing an application for iPad. I have a mapview with several annotations. I need to show a pop-over when the accessory callout method is called, so that the arrow of the popover will point towards the annotation. I am trying to use 'initWithRect' method of the popover, but i'm not getting the co-ordinates(the CGRect in v...

MKAnnotations are being made successfully, however they sometimes fail to render on MKMapView

I'm working on an iPhone app using the 3.1.3 SDK, my app finds the users current location, displays it on a MKMapView and then finds nearby locations and renders them as MKAnnotations. My code is working, however sometimes the nearby annotations do not appear on the map. They are still being made as I see the correct data in the console ...

iPhone - MapKit - Searching locations and moving annotations

I want to make an app that partially mimics some of the behavior the standard map application has. This has proven difficult. First of all, I don't understand how you make annotations movable. How exactly do you do this? Second: how do you search for locations? Thanks ...

MKMapView crash on removeAnnotation

I'm trying to remove annotaenter code heretion some a MKMapView but am crashing on this line: [self.mapView removeAnnotation:p]; p is an object that implements the MKAnnotation protocol and already has an annotation on that map. This is the message I'm getting when I crash: objc[46534]: FREED(id): message release sent to freed objec...

How do I add a button to the subtitle of an MkMapView custom annotation?

Basically my program displays many annotations on a map. after the user clicks on one, It displays the title of the location. How can I add a button under the title that will display a new window with more information on the location? I would also be content with a button at the bottom of the screen that is greyed out until one location ...

Change color of group of MKPinAnnotationView

Hi, I have several annotation pins (aprox 700) in a MapView. Is there any way I can select from an UITableView a row and change the color of a group of pins? Lets say each row representing a group of pins.. Thank you in advance! ...

iPhone: Create MKAnnotation

Can I create an MKAnnotation, or is it read only? I have coordinates, but I am not finding it easy to manually create an MKAnnotation with using setCoordinate. Ideas? ...

Creating an Drop Pin MKPinAnnotation supporting dragging like the Drop Pin in Maps App.

Hi! I wonder if it's possible to create an MKPinAnnotation in a Custom MKMapView, which answers to touch and drag just like the "Drop Pin" annotation in the Maps App. I would like a way to drop a pin at a location given by the GPS. Then let the user fine tune the exact location by touching the Pin and dragging it right, if the GPS is a...

How do I update an MKAnnotation location with new coordinates?

Hi everyone, i'm having problems trying to update an annotation location with different coordinates. Is there any way I can change de location property without having to create another annotation? I've tried the code below with no luck. The annotation i'm trying to get is not updating its location. Please help! CLLocationCoordinate2D lo...

iPhone: addAnnotation not working when called from another view

I have two views, the first view has an MKMapView on it named ridesMap. The second view is just a view with a UITableView in it. When you click the save button in the second view, it calls a method from the first view: // Get my first views class MyRidesMapViewController *rideMapView = [[MyRidesMapViewController alloc] init]; // Call ...

How to Hide MKAnnotationView Callout?

Hello, i'm trying to hide an AnnotationView without touching the pin, is the possible? Thanks! for (id currentAnnotation in self.mapView.annotations) { if ([currentAnnotation isKindOfClass:[MyAnnotation class]]) { } } ...

iPhone Mapkit: Annotation coordinate inconsistances when saved in core data

Here is my situation. For some reason my annotation coordinates that are saved in core data do not seem to match the coordinates that I can retrieve from the pins location on the map. So, I save my data into core data using something like: [ride setLatitude:[NSNumber numberWithDouble:newRidePlacemark.coordinate.latitude]]; [ride setLo...

how do I get the program to Know which annotation is selected and be able to access properties of it?

So far my program can display a database of custom annotation views. Eventually I want my program to be able to display extra information after a button on the annotation bubble is clicked. Each element in the database has a unique entry Number, so I thought it would be a good idea to add this entry number as a property of the custom ann...

How do I place another attribute to a MKAnnotation?

for my app each annotation on a map corresponds to a mine locality. each mine has its own unique 7 digit integer identifier. I'm trying to add the property minesEntryNumber to the annotation so when the annotation is clicked on later I can bring up specific information on the selected annotation. This is part of my code: for (id min...

iphone annotations pins and buttons

Can anyone help me on how to use the - (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control { method. I am trying to tell the annotation pins on my project appart and I can't figure out how. Every pin has a disclosure button but I can't figure out how the progra...

iPhone: Core Data save Class object

I have an entity in core data called Location. Inside this I have a few fields, such as date. But, I would also like to save a class object in it that I created called Annotation. What type of attribute would I use for this, since it is a custom class object that I created? Location (object) |__ Date |__ Annotation (MKAnnotation prot...

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 (...