Android Question Google Maps --- Map_click Error

Discussion in 'Android Questions' started by Roger Daley, Jun 5, 2015.

  1. Roger Daley

    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.

    Code:
    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/2AND (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
     
  2. eurojam

    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
     
    Roger Daley likes this.
  3. Roger Daley

    Roger Daley Well-Known Member Licensed User

    Thanks Stefan,

    Now it works.

    Roger
     
Loading...