Hello,
In the sample Google Maps demo included with uniGUI, I added several markers on the map. Then I add an event listener which do an ajaxRequest against MainForm.UniHTMLFrame1. Then in Delphi code, I handle the event. This works very well.
My question is: since the same event is used for several markers, I would like to pass the marker to the event Handler, much like "sender" in Delphi VCL. How to do that ?
Excerpt form my code:
Javascript:
marker.addListener('dragend',
function(e) {
ajaxRequest(MainForm.UniHTMLFrame1,
'markerDragEnd',
['lat='+e.latLng.lat(), 'lng='+e.latLng.lng()]);
}
Delphi code (In TMainForm.UniHTMLFrame1AjaxEvent)::
if EventName = 'markerDragEnd' then
UniLabel1.caption := 'Lat: '+Params.Values['lat'] +', ' + Params.Values['lng'];
Thanks.