Android Question can help ..OnInfoWindowClickListener

naifnas

Active Member
Licensed User
hi all
first thanks for all
please can help
some wrong when use this..program stop

Dim IWCL As OnInfoWindowClickListener

' info_click.IsInitialized
IWCL.Initialize("IWCL")
GoogleMapsExtras1.SetPadding(GoogleMap1, 0, 180, 0, 500)
GoogleMapsExtras1.SetOnInfoWindowClickListener(GoogleMap1, IWCL)

this error

Panel size is unknown. Layout may not be loaded correctly.
OnInfoWindowClickListener not initialized, no event handling Sub found
 

DonManfred

Expert
Licensed User
Longtime User
Panel size is unknown. Layout may not be loaded correctly.
This does not belong to the listener. It is based on another problem in your code
OnInfoWindowClickListener not initialized, no event handling Sub found
Add the eventsub for the OnInfoWindowClickListener

B4X:
Sub MapFragment1_Ready
      Dim OnInfoWindowClickListener1 As OnInfoWindowClickListener
      OnInfoWindowClickListener1.Initialize("OnInfoWindowClickListener1")      
      GoogleMapsExtras1.SetOnInfoWindowClickListener(GoogleMap1,  OnInfoWindowClickListener1)

end sub

Sub OnInfoWindowClickListener1_click(Marker1 As Marker)

End Sub
 
Upvote 0

naifnas

Active Member
Licensed User
thanks for reply i already
but still problem


Sub IWCL_Click(Marker1 As Marker)
Log("Success!")
End Sub
 
Upvote 0

naifnas

Active Member
Licensed User

Thanks ..
I tired from yesterday i try
now working
 
Upvote 0

naifnas

Active Member
Licensed User
B4X:
Sub MapFragment1_Ready
      Dim OnInfoWindowClickListener1 As OnInfoWindowClickListener
      OnInfoWindowClickListener1.Initialize("OnInfoWindowClickListener1")     
      GoogleMapsExtras1.SetOnInfoWindowClickListener(GoogleMap1,  OnInfoWindowClickListener1)

end sub

Sub OnInfoWindowClickListener1_click(Marker1 As Marker)

End Sub
Thanks DonManfred
i change
Now work good
 
Upvote 0

naifnas

Active Member
Licensed User
I not change font in code
only change to this
B4X:
Sub MapFragment1_Ready
      Dim OnInfoWindowClickListener1 As OnInfoWindowClickListener
      OnInfoWindowClickListener1.Initialize("OnInfoWindowClickListener1")    
      GoogleMapsExtras1.SetOnInfoWindowClickListener(GoogleMap1,  OnInfoWindowClickListener1)

end sub

Sub OnInfoWindowClickListener1_click(Marker1 As Marker)

End Sub
work good
thanks for help
 
Upvote 0

naifnas

Active Member
Licensed User
I have another problem

B4X:
        Dim OnMyLocationButtonClickListener1 As OnMyLocationButtonClickListener
        OnMyLocationButtonClickListener1.Initialize("OnMyLocationButtonClickListener1")
        GoogleMapsExtras1.SetOnMyLocationButtonClickListener(GoogleMap1,OnMyLocationButtonClickListener1)

    End If
End Sub

Sub OnMyLocationButtonClickListener1_Click
    Log("clicked")

End Sub

Error this

B4A Version: 7.30
Parsing code. (0.00s)
Compiling code. (0.06s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Generating R file. (0.06s)
Compiling debugger engine code. (0.66s)
Compiling generated Java code. Error
B4A line: 88
GoogleMapsExtras1.SetOnMyLocationButtonClickList
javac 1.8.0_144
src\com\example\android\mapexample\main.java:512: error: cannot find symbol
_googlemapsextras1.SetOnMyLocationButtonClickListener((com.google.android.gms.maps.GoogleMap)(mostCurrent._googlemap1.getObject()),(com.google.android.gms.maps.GoogleMap.OnMyLocationButtonClickListener)(_onmylocationbuttonclicklistener1.getObject()));
^
symbol: class OnMyLocationButtonClickListener
location: class GoogleMap
1 error
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…