Roger Daley Well-Known Member Licensed User Longtime User Dec 8, 2015 #1 Hi All, [Private MarkerLocation as LatLng] In B4A the code "MarkerLocation = Marker1.Position" loads MarkerLocation with the LatLng of Marker1. In B4J Marker.Position is write only. I can't find anywhere how to get LatLng in B4J Regards Roger Last edited: Dec 8, 2015
Hi All, [Private MarkerLocation as LatLng] In B4A the code "MarkerLocation = Marker1.Position" loads MarkerLocation with the LatLng of Marker1. In B4J Marker.Position is write only. I can't find anywhere how to get LatLng in B4J Regards Roger
R Roycefer Well-Known Member Licensed User Longtime User Dec 8, 2015 #2 When you create the Marker, also place it in a Map as the key and the LatLng as the value. Then you can retrieve the Marker's LatLng. Upvote 0
When you create the Marker, also place it in a Map as the key and the LatLng as the value. Then you can retrieve the Marker's LatLng.
Roger Daley Well-Known Member Licensed User Longtime User Dec 8, 2015 #3 Hi Roycefer Thanks for the reply, firstly I have re-posted the question in B4J where it was intended. I really can't follow your answer[my issue, not yours] but from what it appears I should have mentioned that there are two moveable markers which I need to track. Regards Roger Upvote 0
Hi Roycefer Thanks for the reply, firstly I have re-posted the question in B4J where it was intended. I really can't follow your answer[my issue, not yours] but from what it appears I should have mentioned that there are two moveable markers which I need to track. Regards Roger
eurojam Well-Known Member Licensed User Longtime User Dec 8, 2015 #4 Hi Roger, Roycefer means the following Code: Copy Type MarkerInfo (id As Int, name As String, Latitude As Double , Longitude As Double) Private MarkerMap As Map you have Map and a type for example to store additional information to your Marker later when you add the marker to the map: Code: Copy Dim m As Marker m = gmap.AddMarker(Point.Latitude, Point.Longitude, "some text") Dim MI As MarkerInfo MI.id=1 MI.Latitude MI.Longitude MarkerMap.Put(m, MI) If you want to retrieve information for your marker: Code: Copy Sub gmap_MarkerClick (SelectedMarker As Marker) Dim MI As MarkerInfo MI = MarkerMap.Get(SelectedMarker) Log(MI.Latitude) End Sub ok, wrong forum, should be in B4J.... Upvote 0
Hi Roger, Roycefer means the following Code: Copy Type MarkerInfo (id As Int, name As String, Latitude As Double , Longitude As Double) Private MarkerMap As Map you have Map and a type for example to store additional information to your Marker later when you add the marker to the map: Code: Copy Dim m As Marker m = gmap.AddMarker(Point.Latitude, Point.Longitude, "some text") Dim MI As MarkerInfo MI.id=1 MI.Latitude MI.Longitude MarkerMap.Put(m, MI) If you want to retrieve information for your marker: Code: Copy Sub gmap_MarkerClick (SelectedMarker As Marker) Dim MI As MarkerInfo MI = MarkerMap.Get(SelectedMarker) Log(MI.Latitude) End Sub ok, wrong forum, should be in B4J....