B4A Question Find Google Maps marker by Snippet or Name - Erel (first post)    Jan 15, 2020   (1 reaction) A Map is even better for this.
Markers.Put(NewMarker.Title, NewMarker)
...
Dim m As Marker = Markers.Get("title 1") B4A Question Google maps markers' animation - JordiCP (first post)    Mar 23, 2016   (4 reactions) If you want to "update" the markers position as you keep receiving new coordinates for those points, you should keep a reference to the markers in a map when you create them
Then add a code similar to this example. It is not complete as you need to init PersonList and MarkersMap first with the appr B4A Question Round marker for Google Maps - Sergey_New    May 11, 2024 Я создал на карте круглый красный маркер и поместил его в место, определенное Google Maps — синий маркер. Из рисунка видно, что красный маркер показывает место не центром, а нижним краем. Как переместить маркер в нужное положение?153644 Bug? Google Map Markers color is different in latest library - Erel (first post)    Nov 23, 2022 This is handled by the underlying SDK. B4A Question Google Maps Markers - Erel (first post)    Nov 16, 2016 You can use a Map (the collection) with the marker as the key and then "tie" any data you like to the marker.
Example: https://www.b4x.-wrong-forum-google-maps-marker-location.61154/#post-385846 B4i Question Automatically "press" the Marker in Google Map - Erel (first post)    Jul 14, 2021 The open marker is the selected marker. Only one marker can be selected at a time. It can be done programmatically.
Untested code:
gmap.As(NativeObject).SetField("selectedMarker", OneOfTheMarkers) B4A Question How to change a google map marker icon in the marker click event? - TILogistic (first post)    Aug 18, 2021   (1 reaction) To identify the marker that the user clicked:
MarkerExtras => GoogleMapsExtras library
Sample:
Sub MapFrag_MarkerClick (SelectedMarker As Marker) As Boolean
Dim MarkerId As String = MarkerExtras1.GetId(SelectedMarker)
If MarkerId = "m1" Then
Dim BitmapPosition As B4XBitmap = xui.Lo B4i Question Custom Google Map Markers - Erel (first post)    Oct 22, 2017   (2 reactions) https://www.b4x.com/basic4android/images/SS-2017-10-22_10.15.28.png
Sub CreateBitmap(text As String) As B4XBitmap
Dim xui As XUI
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 32dip, 20dip)
Dim c As B4XCanvas
c.Initialize(p)
c.DrawRect(c.TargetRect, xui.Color B4J Question creating control array at runtime - Erel (first post)    Dec 14, 2020 Google map markers are not controls. They are drawing by the map engine. B4J Question Google maps marker location - Roycefer (first post)    Dec 08, 2015   (1 reaction) Whenever you create a Marker or change its position, add it and its position to a Map:
Dim markerMap as Map
markerMap.Initialize
'.... much later
Marker1.Position = MarkerLocation 'set Marker1's new location
markerMap.Put(Marker1, MarkerLocation) 'place them both in a Map so you can retrieve Marker Page: 1   2   3   4   5   6   7   Powered by ColBERT |