Ich möchte gerne meine aktuelle GPS-Position auf Knopfdruck anzeigen lassen. Später möchte ich die Position in einer Karte anzeigen.
Sub Button4_Click
Dim Location1 As Location
Dim LabelLat As Label
Dim labellon As Label
GPS1.Start(0, 0) 'Listen to GPS with no filters.
LabelLat.Text = "Lat = " & Location1.ConvertToMinutes(Location1.Latitude)
labellon.Text = "Lon = " & Location1.ConvertToMinutes(Location1.Longitude)
End Sub
Auf meinem S3 herhalte ich die Fehlermeldung: An error has occurred in sub:main_button4_click(java line:260) ... Object should first be initialzed (location).
Wie bekomme ich raus was mir die Fehlermeldung sagen soll.
Location ist doch ein Objekt (oder eine Eigenschaft?) in der SUB GPS_LocationChanged (Location1 AsLocation) wird location1 bei jeder Änderung übergeben. Ich möcht aber die Position einmalig haben.
Wo mache ich da meinen Gedankenfehler?
MfG Tudorf
Sub Button4_Click
Dim Location1 As Location
Dim LabelLat As Label
Dim labellon As Label
GPS1.Start(0, 0) 'Listen to GPS with no filters.
LabelLat.Text = "Lat = " & Location1.ConvertToMinutes(Location1.Latitude)
labellon.Text = "Lon = " & Location1.ConvertToMinutes(Location1.Longitude)
End Sub
Auf meinem S3 herhalte ich die Fehlermeldung: An error has occurred in sub:main_button4_click(java line:260) ... Object should first be initialzed (location).
Wie bekomme ich raus was mir die Fehlermeldung sagen soll.
Location ist doch ein Objekt (oder eine Eigenschaft?) in der SUB GPS_LocationChanged (Location1 AsLocation) wird location1 bei jeder Änderung übergeben. Ich möcht aber die Position einmalig haben.
Wo mache ich da meinen Gedankenfehler?
MfG Tudorf