【发布时间】:2014-09-02 14:20:39
【问题描述】:
我的地图视图中很少有 MKPointAnnotation。
一切正常,但是视图的 MKPoiintAnnotation 的“背景”是“不可见的”,因此它不是很“可见”。
我想将背景更改为白色,我尝试使用:
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation
但是我没有成功用这个方法改变背景。我需要使用什么?谢谢,
编辑:“背景”是指文本“当前位置”下的背景(对于本例):
编辑 2:
我正在使用此代码添加注释:
annotationPoint = [[MKPointAnnotation alloc] init];
annotationCoord.latitude = [[item getPlace] getLatitude];
annotationCoord.longitude = [[item getPlace] getLongitude];
annotationPoint.coordinate = annotationCoord;
annotationPoint.title = item.getNom;
annotationPoint.subtitle = [Utils getDateString :item.getDeadline :@"dd/MM/yyyy HH:mm"];
[_mapView addAnnotation:annotationPoint];
【问题讨论】:
-
“背景”是什么意思?
-
等等,我拿个屏幕:)
-
你能把整个代码贴出来吗?
-
但我不认为这是我的代码中的错误,因为“当前位置”不是由我创建的。应该有一个选项来改变这个......
-
您可以在iOS Simulator>Debug>Location下设置GPS坐标。你知道吗?您的代码看起来不错,应该可以正常工作
标签: ios map annotations