marcick Well-Known Member Licensed User Longtime User Nov 6, 2013 #1 Hi, is it possible to query the map and obtain a list of all markers that have been placed and know the title and coordinate of each one ? Or, again, is it possible to know if a marker with a certain title exist on the map ? Marco
Hi, is it possible to query the map and obtain a list of all markers that have been placed and know the title and coordinate of each one ? Or, again, is it possible to know if a marker with a certain title exist on the map ? Marco
Erel B4X founder Staff member Licensed User Longtime User Nov 7, 2013 #2 Each time you add a marker, add it to a List. You will then be able to check their status. Upvote 0
marcick Well-Known Member Licensed User Longtime User Nov 7, 2013 #3 I'm still confused on the correct approach to this library. Suppose I have to place on the map 50 markers, each one has a different icon, position and a unique title. Non I want to change something on the marker that has the title "bob". Do I have to clear all the map and redraw all 50 markers, using the method of the list that you suggest ? Do I have to create each marker with its own global variable ? (Dim Marker1, Marker2 .....Marker50 As Marker) Upvote 0
I'm still confused on the correct approach to this library. Suppose I have to place on the map 50 markers, each one has a different icon, position and a unique title. Non I want to change something on the marker that has the title "bob". Do I have to clear all the map and redraw all 50 markers, using the method of the list that you suggest ? Do I have to create each marker with its own global variable ? (Dim Marker1, Marker2 .....Marker50 As Marker)
Erel B4X founder Staff member Licensed User Longtime User Nov 8, 2013 #4 (Dim Marker1, Marker2 .....Marker50 As Marker) Click to expand... It is never a good idea to create such variables. You can use a Map to map between the marker "name" and the marker. For example: Code: Copy Sub AddMarker(Name As String, Text, ...) Dim m As Marker = gmap.AddMarker(...) MapOfMarkers.Put(Name, m) 'global variable End Sub Now you can get any marker you like. Upvote 0
(Dim Marker1, Marker2 .....Marker50 As Marker) Click to expand... It is never a good idea to create such variables. You can use a Map to map between the marker "name" and the marker. For example: Code: Copy Sub AddMarker(Name As String, Text, ...) Dim m As Marker = gmap.AddMarker(...) MapOfMarkers.Put(Name, m) 'global variable End Sub Now you can get any marker you like.
marcick Well-Known Member Licensed User Longtime User Nov 8, 2013 #5 Fantastic, thanks a lot ! Great support. Upvote 0