Gets the geographical center of a loaded map.
Namespace: MindFusion.Mapping
Package: MapView.js
JavaScript Copy Code |
---|
Object.defineProperty(MapView.prototype, "mapCenter", { value: LatLong }); |
LatLong. A LatLong instance, representing the geographical center of the map.
The following code creates a new MapView using a <DIV> element called "mapview" that we've declared in the HTML code of the page and adds a new Marker to its decorations collection. It sets the center of the map to the location of the Marker:
JavaScript Copy Code |
---|
// create a new instance of the mapView // create a map layer // create some markers with images //adds the Maker to the decorations collection of the view view.center = mark.location; |