【发布时间】:2019-09-26 18:26:03
【问题描述】:
只有一个注释 - 用户位置。我没有添加任何其他的。
这是我的代码:
public override MKAnnotationView GetViewForAnnotation(MKMapView mapView, IMKAnnotation annotation)
{
if (annotation is MKUserLocation)
{
return null;//never hit
}
else if (annotation is myAnnotation a)
{
return a.View;//never hit of course.
}
else
{
string vvvvvvv = annotation.GetType().ToString();//"MKAnnotationWrapper"
return null;//hit even though I didn't add anything else.
}
}
为什么用户位置显示为MKAnnotationWrapper 而不是MKUserLocation?
【问题讨论】:
-
阅读此comment 可能会有所帮助。
标签: ios xamarin xamarin.ios