2013-06-04 16 views
0

我使用此代碼對谷歌實施IInfoWindowAdapter地圖Android版2InfoWindowsAdapter不火的monondroid

public class myInfoWindowsAdapter : GoogleMap .IInfoWindowAdapter 
{ 
    public myInfoWindowsAdapter() 
    { 
    } 

    public View GetInfoContents(Marker marker){ 
     Console .WriteLine ("Hello"); 
     return null ; 
    } 

    public View GetInfoWindow(Marker marker){ 
     Console .WriteLine ("HHHHH"); 
     return null; 
    } 
    public IntPtr Handle 
    { 
     get 
     { 
      return IntPtr.Zero; 
     } 
    } 
    public void Dispose(){ 
    } 


} 

,並使用此象下面這樣:

mapView .SetInfoWindowAdapter (new myInfoWindowsAdapter()); 

,但是當我在類C標記的GetInfoContentsGetInfoWindow永遠不會被地圖解僱。任何人都知道什麼是錯的?

+0

我試圖執行IOnCameraChangeListener但它不是工作壓力太大。 –

回答

0

請試試這個代碼:

public class myInfoWindowsAdapter : Java .Lang .Object , GoogleMap .IInfoWindowAdapter 
{ 
    public myInfoWindowsAdapter() 
    { 
    } 

    public View GetInfoContents(Marker marker){ 
     Console .WriteLine ("Hello"); 
     return null ; 
    } 

    public View GetInfoWindow(Marker marker){ 
     Console .WriteLine ("HHHHH"); 
     return null; 
    } 



}