(TMap.OnClickListener Method)
Registers an event handler for mouse-click event. The argument-OnClick is a function which would be called when the map is clicked with the mouse. You should implement the function OnClick. Be sure that OnClick would have two arguments: the first is latitude, the second longitude, which represents where the mouse is clicked on the map, if the map is to display the latitude and longitude values when double clicked.
public OnClickListener(OnClick):Void
<div id="mapContainer" style="width: 640px; height: 400px;"></div> <script type="text/javascript"> var map0 = new TMap(mapContainer, 25.7590256665386, -80.3738769902151, 15, mapLoaded, 1, true, "", "hybrid"); function mapLoaded() { map0.SetOnClickListener( MapClicked); } function MapClicked(lat,lon){ map0.ShowInfoWindow(lat, lon,"width=240;height=100", "You clicked on:", "Latitude=\t" + lat + "\nLongitude=\t" + lon); } </script>