EaxMapView.MapType

Syntax

MapType: PP.MapChartType

Description

The MapType property determines type of express report map.

Comments

The default value is PP.MapChartType.SVG.

Use the setMapType method to set the property value, and the getMapType method to get the property value.

Example 1

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component) and have a loaded map in the working area. Set the PP.MapChartType.Google express report map type and process the MapTypeChanged and GoogleLoadError events:

// Get express report map view
var eaxMapView = expressBox.getDataView().getMapView();
// Handle the MapTypeChanged event
eaxMapView.MapTypeChanged.add(function (sender, args) {
    console.log("New map type: " + args.Type);
});
// Handle the GoogleLoadError event
eaxMapView.GoogleLoadError.add(function (sender, args) {
    console.log("Error loading Google map.");
});
// Change express report map type for Google
eaxMapView.setMapType(PP.MapChart.Type.Google);

After executing the example map type changes to Google, the MapTypeChanged event occurs, and the browser console displays the new map type:

New map type: Google

Example 2

The example of property use is also given in the page with description of the EaxMapView.getSilverlightInstance method.

See also:

EaxMapView