I want to change a marker icon when the user clicks on that marker in a google maps fragment.
So, I'm assuming I would do this in the mapfrag_MarkerClicked event (as shown below).
And when looking at this post, it suggests that there should be a method to do this using the Marker object:
But, in B4A 9.0, there doesn't seem to be such a method.
Any ideas how I can change the icon when it's clicked on?
P.S. I am using Erel's Google Maps 2.5 Lib (https://www.b4x.com/android/forum/threads/google-maps.63930/#content)
So, I'm assuming I would do this in the mapfrag_MarkerClicked event (as shown below).
And when looking at this post, it suggests that there should be a method to do this using the Marker object:
google map API v3 change marker icon on click?
Following google documentation up to changing the marker icon was easy. But I'm stuck, I don't know how to change image when marker is clicked? My code so far: <script> function initializ...
stackoverflow.com
B4X:
//Change the marker icon
marker.setIcon('https://www.google.com/mapfiles/marker_green.png');
But, in B4A 9.0, there doesn't seem to be such a method.
B4X:
Sub MapFrag_MarkerClick (SelectedMarker As Marker) As Boolean
SelectedMarker.SetIcon '<--------- no such method
End Sub
Any ideas how I can change the icon when it's clicked on?
P.S. I am using Erel's Google Maps 2.5 Lib (https://www.b4x.com/android/forum/threads/google-maps.63930/#content)
Last edited: