ASP.NET Pack Programmer's Guide
LatLong.lat Property
See Also
 





Gets or sets the latitude of the location.

Namespace: MindFusion.Mapping
Package: LatLong.js

 Syntax

JavaScript  Copy Code

Object.defineProperty(LatLong.prototype, "lat", { value: Number });

 Property Value

Number. The latitude in degrees.

 Example

The following example creates a new MapView using a <DIV> element called "mapview" that we've declared in the HTML code of the page. It handles its click event and checks at what location the user has clicked.

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);

var markers = new m.DecorationLayer("Images");

// create some markers with images
var mark = new m.Marker(new m.LatLong(-22.951916, -43.210487));
mark.imageSrc = "./images/christ_redeemer.png";
mark.text = "Christ the Redeemer";
mark.visible = false;
markers.decorations.add(mark);

view.layers.add(markers);

function mapViewClickHandler( sender, args )
{
    if(args.location.lat < 0 && args.location.long < 0)
             mark.visible = true;

 
}

 See Also

LatLong Members
LatLong Class
MindFusion.Mapping Namespace