(TMap.OnDoubleClickListener Method)
Registers an event handler for mouse-double click event. The argument-OnDoubleClick- is a function which would be called when the map is double clicked with the mouse. You should implement the function OnDoubleClick. Be sure that OnDoubleClick 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 OnDoubleClickListener(OnDoubleClick):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.SetOnDoubleClickListener(MapDoubleClicked); } function MapDoubleClicked(lat,lon){ var boundary = map0.GetBounds(); var tab0 = new TTabObject("Center", "Latitude=\t" + lat + "\nLongitude=\t" + lon); var tab1 = new TTabObject("Four Borders", "Top\t= "+boundary.latitude1+"\nButtom\t= "+boundary.latitude2+ "\nLeft \t= "+boundary.longitude1+"\nRight\t= "+boundary.longitude2); var tabArray = new Array (); tabArray[0] = tab0; tabArray[1] = tab1; map0.ShowInfoWindowTabs(lat, lon, "width=240;height=120", "Current Coordinates:", tabArray); } </script>