Hi,
I can show a number of markers indicating where photos were taken using the code:
I have set the title for each marker as the filename of the particular photo.
I then wish to set up an event so that when a marker is clicked the photo is shown in an imageview. Following the above code I've added:
The B4A subroutine is:
However, when I run the program and click on one of the markers I get the error message:
Can anyone suggest the meaning of the error message, and how it can be avoided.
Many thanks
bryanh
I can show a number of markers indicating where photos were taken using the code:
B4X:
For i = 0 to numphotos,
..
HtmlCode = HtmlCode & "; var marker = new google.maps.Marker({ position: new google.maps.LatLng(" & lat & "," & lon & "),map: map, clickable: true, draggable: true, icon: 'http://www.google.com/mapfiles/marker_orange.png' })"
HtmlCode = HtmlCode & "; marker.setTitle('" & picfile & "')"
..
Next
I then wish to set up an event so that when a marker is clicked the photo is shown in an imageview. Following the above code I've added:
B4X:
HtmlCode = HtmlCode & "; google.maps.event.addListener(marker, 'click', function(mouseevent) {"
HtmlCode = HtmlCode & "B4A.CallSub('MapViewer_MarkerClicked', marker.getTitle); })"
The B4A subroutine is:
B4X:
Sub MapViewer_MarkerClicked(mark As String)
ImageView1.Bitmap = LoadBitmap(picdir, mark)
End Sub
However, when I run the program and click on one of the markers I get the error message:
B4X:
java.lang.Exception: Sub mapviewer_markerclicked
signature does not match expected signature
Can anyone suggest the meaning of the error message, and how it can be avoided.
Many thanks
bryanh