mkpinannotationview

How to find which annotation send showDetails?

筅森魡賤 提交于 2019-11-27 05:39:41
How to find which annotation send showDetails? MKPinAnnotationView* customPinView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:BridgeAnnotationIdentifier] autorelease]; customPinView.pinColor = MKPinAnnotationColorPurple; customPinView.animatesDrop = YES; customPinView.canShowCallout = YES; // add a detail disclosure button to the callout which will open a new view controller page // // note: you can assign a specific call out accessory view, or as MKMapViewDelegate you can implement: // - (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *

Custom MKPinAnnotation callout bubble similar to default callout bubble

那年仲夏 提交于 2019-11-27 01:04:25
i want to create a custom callout bubble on MKMapView. But i want to create the call out bubble in the same manner of default bubble. So how to create a View look like annotaion in this image (source: objectgraph.com ) I want a custom custom view which look like "Parked Location" annotaion in the following image. with custom width, height etc. P I am not able to add required details in Default bubble. Thats why am creating custom bubble. Plz help me..thanks.. I have developed a custom callout bubble that is nearly identical to the system callout bubble, but gives more flexibility over the

Z-ordering of MKAnnotationViews

橙三吉。 提交于 2019-11-26 22:58:11
问题 I'm getting fairly frustrated with the limitations of MKMapKit. My current problem has to do with the z-ordering of annotation views, particularly as it relates to touches. If you accept the default z-order the mapkit gives you: The order appears random. The z-order is unrelated to the order the annotations were added. If one annotation ends up on top of another one, touching the top annotation generally brings up the callout for the bottom annotation. It seems like the hit detecting doesn't

Wanted: How to reliably, consistently select an MKMapView annotation

杀马特。学长 韩版系。学妹 提交于 2019-11-26 22:40:01
问题 After calling MKMapView 's setCenterCoordinate:animated: method (without animation), I'd like to call selectAnnotation:animated: (with animation) so that the annotation pops out from the newly-centered pushpin. For now, I simply watch for mapViewDidFinishLoadingMap: and then select the annotation. However, this is problematic. For instance, this method isn't called when there's no need to load additional map data. In those cases, my annotation isn't selected. :( Very well. I could call this

How can I create a custom “pin-drop” animation using MKAnnotationView?

倾然丶 夕夏残阳落幕 提交于 2019-11-26 18:13:55
I have an instance of MKMapView and would like to use custom annotation icons instead of the standard pin icons supplied by MKPinAnnotationView. So, I've setup a subclass of MKAnnotationView called CustomMapAnnotation and am overriding -(void)drawRect: to draw a CGImage. This works. The trouble comes when I try to replicate the .animatesDrop functionality supplied by MKPinAnnotationView; I would love for my icons to appear gradually, dropped from above and in left-to-right order, when the annotations are added to the MKMapView instance. Here is -(void)drawRect: for CustomMapAnnotation, which

Custom MKPinAnnotation callout bubble similar to default callout bubble

允我心安 提交于 2019-11-26 12:25:59
问题 i want to create a custom callout bubble on MKMapView. But i want to create the call out bubble in the same manner of default bubble. So how to create a View look like annotaion in this image (source: objectgraph.com) I want a custom custom view which look like \"Parked Location\" annotaion in the following image. with custom width, height etc. P I am not able to add required details in Default bubble. Thats why am creating custom bubble. Plz help me..thanks.. 回答1: I have developed a custom

How to capture Tap gesture on MKMapView

你。 提交于 2019-11-26 12:09:17
问题 I am trying to capture tap event on my MKMapView , this way I can drop a MKPinAnnotation on the point where user tapped. Basically I have a map overlayed with MKOverlayViews (an overlay showing a building) and I would like to give user more information about that Overlay when they tap on it by dropping a MKPinAnnotaion and showing more information in the callout. Thank you. 回答1: You can use a UIGestureRecognizer to detect touches on the map view. Instead of a single tap, however, I would

How to find which annotation send showDetails?

喜你入骨 提交于 2019-11-26 11:39:56
问题 How to find which annotation send showDetails? MKPinAnnotationView* customPinView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:BridgeAnnotationIdentifier] autorelease]; customPinView.pinColor = MKPinAnnotationColorPurple; customPinView.animatesDrop = YES; customPinView.canShowCallout = YES; // add a detail disclosure button to the callout which will open a new view controller page // // note: you can assign a specific call out accessory view, or as

How do I animate MKAnnotationView drop?

随声附和 提交于 2019-11-26 10:31:41
问题 I have a custom MKAnnotationView where I set my image myself in viewForAnnotation. How do I animate it\'s drop like I can with MKPinAnnotationView? My code is - (MKAnnotationView *)mapView:(MKMapView *)map viewForAnnotation:(id <MKAnnotation>)annotation { static NSString *AnnotationViewID = @\"annotationViewID\"; MKAnnotationView *annotationView = (MKAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:AnnotationViewID]; if (annotationView == nil) { annotationView = [[

MKPinAnnotationView: Are there more than three colors available?

血红的双手。 提交于 2019-11-26 06:55:54
问题 According to the Apple docs, MKPinAnnotationView\'s pin color is available in red, green and purple. Is there any way to get other colors also? I\'ve found nothing in the docs. 回答1: You might find the following images useful: and the code to use them in viewForAnnotation : - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>) annotation { // ... get the annotation delegate and allocate the MKAnnotationView (annView) if ([annotationDelegate.type