Sends a request to TerraFly® servers to geocode the specified address. If the address was successfully located, the user-specified callback function is invoked and the arguments conveyed to the callback function are latitude and longitude for the located point. Otherwise, the callback function is given a null point. In case of ambiguous addresses, only the point for the best match is passed to the callback function.
public GetLatLngByAddress(addressFull, CallBackFunctor):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.SetPanelVisibility("NAV", "SHOW"); map0.SetPanelVisibility("ZOOM", "SHOW"); map0.SetPanelVisibility("OVERVIEW", "SHOW"); } function Button_Goto_onclick(){ var address = Text_Street.value; TGetLatLngByAddress(address, geoCode); } function geoCode(Lat, Lon){ if ( Lat == 0.0 || Lon == 0.0 ){ alert("Could not find the location!"); } else { map0.PanTo(Lat, Lon); } } </script>