Search
ZoomPivot Enumeration
See Also
 






Specifies the pivot point of the mouse wheel zoom in a MapView control.

Namespace: MindFusion.Mapping
File: Enum.js

 Syntax

JavaScript  Copy Code

// enum
ZoomPivot = {}

 Members

  Member name Description

Center

The zoom pivot point is the center of the map.

Cursor

The zoom pivot point is the current cursor position.

 Example

The following code creates a new MapView from an HTML <div> element with an id "mapView" and sets its zoomPivot property to "Cursor".

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.mapBounds = new m.LatLongRect(51.507351, -0.127758, 48.856613, 2.352222);
view.zoomPivot = m.ZoomPivot.Cursor;

 See Also