Hi!i have two latitude and longitude. one is current latitude,longitude and second i get from web service now by using both i want to draw a path between this two so what should i do?i have no idea about it.Please help me....Thanks in Advance....
...
Why doesn't this work?
- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views {
if (TRACE_LOG) NSLog(@"%s", __FUNCTION__);
[mapView selectAnnotation:[views lastObject] animated:YES];
return;
}
Thanks,
Z@K!
...
I'm adding an observer to my annotationviews with the following code
- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views {
for (MKAnnotationView *anAnnotationView in views) {
//[anAnnotationView setCanShowCallout:YES];
[anAnnotationView addObserver:self
forKeyPath:@"...
Hi all. I've just found a strange issue with my sub classed mkannotationview.
When I add the first 5 markers, they all work perfectly. In the mkannotationview sub class, I NSLog a message which I see 5 times. However, when I remove ALL the markers and redraw them - using all the same methods, I see the NSLog only once.
It's like the m...
I've implemented a custom annotation derived from MKAnnotation called ContainerAnnotation and a custom annotation view derived from MKAnnotationView with a drawRect: method called ContainerAnnotationView. For some reason the drawRect: method is not getting called and I can't figure out why.
Here's the source code for my annotation view...
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...
I've got annotation views with custom pin images on a map. When I tap and hold on a pin, my custom image disappears and is replaced by the default red pin. This default image appears in its selected (highlighted) state (it looks slightly darker). How can I prevent the selected state image from replacing my custom image?
Many thanks.
...
Hi all again
Did somebody ever override successfully the method setDragState in MKAnnotationView?
If I try to google for it with "mkannotationview setDragState" I only get three hits! One of them is my other post on stackoverflow ;)
The reference says that when subclassing MKAnnotationView the subclass has to care about the dragstate....
Hi all
I have an annotationview (draggable property is set to YES) with a cutstom image, set via the image property. When the annotation is added to the map it has the custom image. But the image turns back to the default pin when the annotation is dragged. I also tried to overwrite the image propery everytime the dragstate changes. N...
I have a map that dynamically shows annotations as the user moves around. I am using the method regionDidChangeAnimated to know when the map has been moved and then I get annotations based on the new latitude and longitude. If the user zooms out then I am clustering the annotations.
I want to have it so that when a user clicks on a ...
Hi all,
I created an MKAnnotation name PushPin which has a title and subtitle. I want to be able to dynamically change the title at a later time. I'm close so I'd rather not have to make a whole new AnnotationView, but if I have to I guess that's ok too. My problem is that, once I change the text for the title, the window does not re...
Hi,
I am writing an iPad application (os 3.2) which uses MKMapKit to display moving annotations on the map. Information is retrieved via XML from three different sources and collated together in my Annotation class and then displayed on the Map. This information is coming in every 5 seconds. I had this working fine for a few months w...
I have some pins that the user can add. In the callout there is a button.
When the user presses the button, I want a new pin to drop in that location, and I want to get rid of the pin that the user pressed (different types of pins).
Basically the first pin is draggable, and when the user has found a proper location they will "lock" it....
I was wondering if anyone knows of any subclasses for the MKAnnotationView class. On apples documentation they say one example is the MKPinAnnotationView so I was wondering if there were other pre-created subclasses like the one used to track the devices current location. If anyone has tips for creating my own subclass of the MKAnnotatio...
Hello,
I have a mapview with a few pins on it. The pins are loading longitude and latitude from a plist. I've also added a detailview where you get more info about the pin that gets tapped. However my problem is that when I tap on a pin (discloseButton ofc) and get pushed to the detailview it's always the last items data that loads (fro...
Good Day!
i need to add custom layout on the click of the annotation pin which already has title and subtitle, but i need to add more detail into it. i need it to be multiline. can some body tell me.
i am talking about mapkit in iphone. and mkannotation views.
Thanks
...
Hi all,
I am implementing a MKMapView based application. In that I am using a custom image instead of displaying a pin by using MKAnnotationView.Image property. It is working fine. But I had a problem with pin display it is showing in the ocean. When I used default pin it works fine. I don't know what is the problem. Can you guys please...
Every few seconds I'm retrieving an updated lat and lon for a real-world object that is in motion. This object is represented on my MKMapView by an MKAnnotationView.
Is it possible to smoothly animate the object's movement from coordinate to coordinate, rather than remove its current MKAnnotationView and add a new one at the new coordi...