Gets the geographical center of a loaded map.
Namespace: MindFusion.Mapping
File: MapView.js
SyntaxJavaScript
Copy Code
|
|---|
get mapCenter() {} |
LatLong. A LatLong instance, representing the geographical center of the map.
ExampleThe 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; |
See Also