mkannotation

How can I customize the title/subtitle font in callout from MKAnnotationView or just hide them?

♀尐吖头ヾ 提交于 2019-12-22 06:01:23
问题 I have a view to a calloutDetail: annotationView.detailCalloutAccessoryView = mapInformationView.view It is working just fine, but I don't want to display a title/subtitle, just my custom view. But when I left title/subtitle empty the callout isn't displayed. So, How can I hide them or just change their font size and name? 来源: https://stackoverflow.com/questions/33847133/how-can-i-customize-the-title-subtitle-font-in-callout-from-mkannotationview-or

How can I customize the title/subtitle font in callout from MKAnnotationView or just hide them?

可紊 提交于 2019-12-22 06:01:13
问题 I have a view to a calloutDetail: annotationView.detailCalloutAccessoryView = mapInformationView.view It is working just fine, but I don't want to display a title/subtitle, just my custom view. But when I left title/subtitle empty the callout isn't displayed. So, How can I hide them or just change their font size and name? 来源: https://stackoverflow.com/questions/33847133/how-can-i-customize-the-title-subtitle-font-in-callout-from-mkannotationview-or

didAddAnnotationViews not working on MKMapView

旧城冷巷雨未停 提交于 2019-12-22 05:38:12
问题 I've been playing around with the MKMapView and trying get my head around how the MKMapViewDelegate system works. So far I have no luck in getting the didAddAnnotationViews to get called when the current location marker is added. I have set my app delegate to implement MKMapViewDelegate, I have an Outlet to the MapView in my xib and have set the delegate property of the MapView to be self, as in the app delegate instance. I have implemented didAddAnnotationViews in the app delegate which I

Making map pins spread out from a cluster

偶尔善良 提交于 2019-12-21 20:39:17
问题 I've got two custom annotation classes for my map: one for a single post tied to a location, and one for a cluster of those posts. The cluster stores pointers to all of the posts it contains, as well as a central lat/long location (calculated using the locations of the posts it contains). I have the behaviour that when I click on a cluster annotation it removes the cluster and adds its posts to the map. What I want is to change the pin-drop annotation when expanding the clusters to an

Rotate only view and not its subviews

柔情痞子 提交于 2019-12-21 18:30:05
问题 Is there any way by which transform of a view for rotation wont be passed to its subviews? I have a custom MKAnnotationView which I am rotating according to the heading values of the user. In below method in the custom Annotation view class , i am adding a subview to the annotation view. - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; if(selected) { [self addSubview:self.myCallOutView]; return; } [self.myCallOutView

MKMapView with custom MKAnnotation

北城以北 提交于 2019-12-21 02:51:34
问题 I've a MKMapView. I want to put a custom MKAnnotation on my map. They are some restaurant places. How can I do it? My question is how can I make a custom MKAnnotation? Thanks, guys. 回答1: If you totally want to customize the callout View of the annotation.. See this link.. http://blog.asolutions.com/2010/09/building-custom-map-annotation-callouts-part-1/ 回答2: First, let's define custom as meaning not simply title and subtitle. We want to change the size of the MKAnnotation and include some

On mkuserlocation, how do I show my own custom message in viewForAnnotation

可紊 提交于 2019-12-20 05:49:16
问题 I want to show a custom message instead of "My Location" in viewForAnnotation. How do I do this? Thanks Deshawn 回答1: In the delegate of your MKMapView , implement the method mapView:viewForAnnotation and check if the annotation is of type MKUserLocation . If yes, change the title and subtitle properties of the annotation. The callout will automatically pull the new values. Or you can create a totally new view and return it here. - (MKAnnotationView *)mapView:(MKMapView *)mapView

Swift - setting different images from array to annotation pins

爷,独闯天下 提交于 2019-12-19 11:25:17
问题 I wonder how to set different images to annotation pins on mapview. The difference between the following questions viewForAnnotation confusion and customizing the pinColor iteratively Swift different images for Annotation is that my array of images is generated dynamically with regard to server response. There is no fixed size of the array, so switch/case construction is not a good idea. Moreover, I'm not sure how to apply the solution with custom class aforementioned in topic above. I'm

Custom Annotation View do not work on iOS6

被刻印的时光 ゝ 提交于 2019-12-19 10:18:53
问题 I'm using the J4n0 Callout code (github) to implement a custom annotation in MapKit. It was working just fine on iOS5. But on iOS6 I have 2 problems: Annotations are displayed over the AnnotationView (see picture 1). The first Click on an Annotation opens the AnnotationView just fine, but the second click opens an annotation with a bad size (see picture 2). Does anyone using this library have some similar problem/solution? I can give some code if needed! 回答1: If annotations are displayed over

How do I show MKOverlay above MKAnnotations?

元气小坏坏 提交于 2019-12-19 06:18:08
问题 I'm trying to use an MKOverlay (specifically an MKPolyline ) to show a route on the map. However, I need the route to show up above my existing pins (custom MKAnnotationView s). Is there a good way to bring the MKPolyline to the front above the pins? 回答1: It might be useful to investigate the annotation layer's zOrder property. Sending the annotations backwards in your superview's hierarchy may help you achieve the effect needed. Changing your annotation z-axis position should probably be