问题描述
但是,我只能以失去注释标题的代价来自定义图像。在以下代码中,取自 MapDelegate 的 GetViewForAnnotation,设置自定义图像不仅仅是为了确认将显示标题。
MapKit.MKAnnotationView vehicleView = (MapKit.MKAnnotationView)mapView.DequeueReusableAnnotation(mKPointAnnotation.Subtitle.GetHashCode().ToString());
if (vehicleView == null)
{
vehicleView = new MapKit.MKAnnotationView(annotation,mKPointAnnotation.Subtitle.GetHashCode().ToString());
byte[] encodedDataAsBytes = Convert.FromBase64String(mKPointAnnotation.Subtitle);
NSData data = NSData.FromArray(encodedDataAsBytes);
var uiImage = UIImage.LoadFromData(data);
vehicleView.CanShowCallout = true;
//vehicleView.Image = uiImage;
vehicleView.Layer.ZPosition = 7;
}
return vehicleView;
让我们看看结果:
我该怎么办?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)