如何在Xamarin中实现InfoWindowAdapter接口?

o2rvlv0m  于 11个月前  发布在  其他
关注(0)|答案(1)|浏览(103)

我正在使用Xamarin,我想创建一个实现GoogleMap.InfoWindowAdapter接口的CustomWindowAdapter。
到目前为止,我已经尝试过了:

public class CustomWindowAdapter : InfoWindowAdapter
{

}

字符串
我得到这个错误:
错误CS0246:找不到类型或命名空间名称“InfoWindowAdapter”(是否缺少using指令或程序集引用?)
下面是接口的文档:https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/GoogleMap.InfoWindowAdapter
能帮帮我吗
我需要使用什么using语句?
Thanks in advance

ujv3wf0j

ujv3wf0j1#

步骤1:从组件商店获取Google Play服务组件
步骤2:实现GoogleMap.IInfoWindowAdapter

using Android.Gms.Maps;
using Android.Gms.Maps.Model;
using Android.Views;

public class InfoWindow : Java.Lang.Object, GoogleMap.IInfoWindowAdapter
{
    #region IInfoWindowAdapter implementation

    public View GetInfoContents(Marker p0)
    {
        throw new NotImplementedException ();
    }

    public View GetInfoWindow(Marker p0)
    {
        throw new NotImplementedException ();
    }

    #endregion
}

字符串

相关问题