Android Question Google Maps --- Map_click Error

Roger Daley

Well-Known Member
Licensed User
Hello All,

Can someone please tell me the meaning of this error.
I have tried to add a "Map_click" event with the code below but it only results in the error message. Attached jpg.

B4X:
Timer1.Initialize("Timer1", 1)

Sub Map_click
    Timer1.Enabled = True                ' Start Timer for scrolling screen
End Sub


Sub Timer1_Tick
    Projection1=GoogleMapsExtras1.GetProjection(gmap)
   
    MarkerLocation = BTSMarker.Position
    BTSPosition = Projection1.toScreenLocation(MarkerLocation)
    BTSX = BTSPosition.X
    BTSY = BTSPosition.Y
    MarkerLocation = LANDMarker.Position
    LMPosition = Projection1.toScreenLocation(MarkerLocation)
    LMX = LMPosition.X
    LMY = LMPosition.Y
   
    If (BTSIV.Left = BTSX - BTSIV.Width/2) AND (LMIV.Top = LMY - LMIV.Height/2 + pnlDispLatLng.Height) Then
        Timer1.Enabled = False
    Else
        BTSIV.Left = BTSX - BTSIV.Width/2
        BTSIV.Top = (BTSY - BTSIV.Height/2) + pnlDispLatLng.Height
        LMIV.Left = LMX - LMIV.Width/2
        LMIV.Top = (LMY - LMIV.Height/2) + pnlDispLatLng.Height
    End If
End Sub

Regards Roger

Map_click Error.jpg
 

eurojam

Well-Known Member
Licensed User
Hello Roger,
this error means that the subroutine definition Sub Map_Click is not formed correctly. The sub Sub Map_Click expects a parameter: sub Map_Click (P As LatLng)

Best regards
stefan
 
Top