Hi. I'm developing an application that uses map and location, I could not make the map rotate, to always go up, according to the movement of the smartphone. I think I have to make it spin automatically, but how do I know what value I should put as a parameter? Do you have any more detailed examples?
Thank you very much.
I even put this doubt into another conversation, but the answer did not help me much ..
the code I'm using is this:
'-----------------------------------------------------------------------
Sub GPS_LocationChanged (Location1 As Location)
    If (vTelaAtual = "Motorista") Then
        'GPS1.LocationSettingsIntent
        vLatOld = vLatitude
        vLongOld = vLongitude
       
        vLatitude = Location1.Latitude
        vLongitude = Location1.Longitude
        vVelocidade = Location1.Speed * 3.6
       
        vLatitude = vLatitude & "000000000000"
        vLongitude = vLongitude & "000000000000"
        vVelocidade = vVelocidade  & "000000000000"
       
        vLatitude = vLatitude.SubString2(0,12)
        vLongitude = vLongitude.SubString2(0,12)
        vVelocidade = vVelocidade.SubString2(0,12)
        mfMapaMotorista_Ready
       
'        SetBearing( Location1 )
        If( (vTelaAtual = "Motorista") And (tmTempo.Enabled = False) ) Then    tmTempo.Enabled= True
    End If
End Sub
'-----------------------------------------------------------------------
Sub mfMapaMotorista_Ready
    If( (GPS1.IsInitialized) And  (vLatitude <> "") And (vLongitude <> "" )) Then
        gmap = mfMapaMotorista.GetMap
        gmap.Clear
  
        Dim vVeloc As Double = vVelocidade
      
        Dim m1 As Marker = gmap.AddMarker(vLatitude, vLongitude, pNomeExibir)
  
        m1.Snippet = vVeloc & "KM/h"
        m1.Title = pNomeExibir
      
        Activity.title = pNomeExibir & " - " & NumberFormat( vVeloc, 0,3) & " KM/H"
      
        Dim latlon As LatLng
        latlon.Initialize(vLatitude,vLongitude)
                  
        Dim lBearingTo As Location, vBearingTo As Double
        lBearingTo.Initialize2(gmap.MyLocation.Latitude, gmap.MyLocation.Longitude)
      
        vDestino.Initialize
        vBearingTo = vDestino.BearingTo(lBearingTo)
          
        gmap.MapType = gmap.MAP_TYPE_NORMAL
        gmap.MapType = gmap.MAP_TYPE_NORMAL
        gmap.MyLocationEnabled = True
        gmap.GetUiSettings.MyLocationButtonEnabled =True
        gmap.GetUiSettings.TiltGesturesEnabled = True
        gmap.GetUiSettings.ZoomGesturesEnabled = True
        gmap.GetUiSettings.CompassEnabled = True
        gmap.GetUiSettings.RotateGesturesEnabled = True
        gmap.GetUiSettings.ZoomControlsEnabled = True
        Dim cp As CameraPosition
        cp.Initialize2( latlon.Latitude, latlon.Longitude, gmap.CameraPosition.Zoom, vBearingTo, 1)
        gmap.AnimateCamera(cp)
    End If
End Sub
'-----------------------------------------------------------------------