WbkDataView.getMapView

Syntax

getMapView ();

Description

The getMapView method returns component that shows a map.

Comments

This method returns an instance of the EaxMapView class.

Example

To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), make sure that the Map view is active in the workbook you open, and also add the following code in the event handler that processes document opening:

var disableScrollButt = new PP.Ui.Button({
	ParentNode: document.body, //DOM parent node
	Content: "Wheel Zoom", //Button name
	Click: PP.Delegate(onClickScroll)
}); 
var useZoomOnWheel = False;
function onClickScroll(){
	//Get component used to display workbook data
	var dataView = workbookBox.getDataView();
	//Get component used to display a map
	var mapView = dataView.getMapView();
	//Disable wheel zoom
	mapView.setUseZoomOnWheel(useZoomOnWheel);
	useZoomOnWheel = !useZoomOnWheel;
}

After executing the example the button named Wheel Zoom is placed in the HTML page. Clicking this button enables and disables mouse use to zoom the map.

See also:

WbkDataView