Search
MapView.clientToLatLong Method
See Also
 






Converts the specified client point to geographic coordinates.

Namespace: MindFusion.Mapping
File: MapView.js

 Syntax

JavaScript  Copy Code

function clientToLatLong (point)

 Parameters

point

Point. The client point to convert.

 Return Value

LatLong. A LatLong instance representing the geographic location.

 Example

The following code handles the click event of a MapView and uses the clientToLatLong method to convert the location of the clicked point:

JavaScript  Copy Code

var m = MindFusion.Mapping;

// create a new instance of the mapView
var view = new m.MapView(document.getElementById("mapView"));
view.theme = "light";
view.click.addEventListener(mapViewClickHandler);

function mapViewClickHandler( sender, args )
{
     LatLong location = view.clientToLatLong( args.rawEventArgs.clientX, 
       args.rawEventArgs.clientY);
 
}

 See Also