ColdFusion.Map.getLatitudeLongitude

Description

Gets the latitude/longitude coordinates for a given address.

Function syntax

ColdFusion.Map.getLatitudeLongitude("address", "callBack")

History

ColdFusion 9: Added this function

Parameters

Parameter

Description

address

Specifies the value in the address attribute of the cfmap tag.

callBack

The callback function that runs after the longitude/latitude values are successfully located.

Returns

This function returns a callback function that gets the latitude and longitude values of the specified address.

Example

<h3>This is an example of the Map.getLatitudeLongitude function. Click the HTML button labeled "GetLatitude-Longitude" to get the latitude and longitude of Ann Arbor,MI.</h3> 
    <script> 
    function getLongitudeLatitude() 
    { 
    ColdFusion.Map.getLatitudeLongitude('201 S. Division St. Suite 500 Ann Arbor, MI 48104', callbackHandler); 
    } 
    function callbackHandler(result) 
    { 
    alert("The latitude-longitude of Ann Arbor,MI is: "+result); 
    } 
    </script> 
    <h3>MAP 1</h3> 
    <cfform name="map01"> 
    <cfinput type="button" value="GetLatitude-Longitude" name="buttn03" 
    onclick="javascript:getLongitudeLatitude()"> 
    </cfform> 
    <cfmap name="mapID" centerlatitude= 42 
    centerlongitude=-87 
    doubleclickzoom="true" 
    overview=true 
    scrollwheelzoom=true tips="My Map" zoomlevel="4"> 
    </cfmap>