【问题标题】:Is there a way to disable info window on xamarin.forms.maps on iOS project?有没有办法在 iOS 项目上禁用 xamarin.forms.maps 上的信息窗口?
【发布时间】:2021-12-05 21:00:00
【问题描述】:

我想禁用 xamarin.forms.maps 中引脚上的信息窗口?有没有办法做到这一点?

【问题讨论】:

    标签: c# xamarin


    【解决方案1】:

    这里是关于删除地图信息窗口的代码,你可以在方法中添加它 你想用

       nativeMap.DidDeselectAnnotationView += OnDidDeselectAnnotationView;
         void OnDidDeselectAnnotationView(object sender, MKAnnotationViewEventArgs e)
                {
                    if (!e.View.Selected)
                    {
                        customPinView.RemoveFromSuperview();
                        customPinView.Dispose();
                        customPinView = null;
                    }
            }
    

    【讨论】:

      猜你喜欢
      • 2014-09-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多