EaxMapBox.getService

Syntax

getService();

Description

The getService method returns service object to work with express report.

Comments

The method returns a PP.Exp.EaxMdService object.

Example

Executing the example requires that the HTML page contains the EaxMapBox component named map (see Example of Creating the EaxMapBox Component) and have the map Russia.tbs installed. Move to the lower hierarchy level in express report map:

var service = map.getService();
var source = map.getSource();
var shapeId = "RU-KYA"; // Krasnoyarsk region
if (source.canMapDrillUp()) {
    // Determine callback function
    var onDrillChanged = function () {
        map.DataChanged.fire(this, new PP.Mb.Ui.PropertyChangedEventArgs({
            TypeUpdateData: [PP.Exp.Ui.ViewTypeUpdate.DimBarSelection, PP.Exp.Ui.ViewTypeUpdate.Title],
            PropertyName: PP.Exp.Ui.ControlType.DrillDown
        }));
        map.refreshAll();
    };
    map.DrillUp.add(function (sender, args) {
        console.log("Move to the lower hierarchy level in the map.");
    });
    // Move to the lower hierarchy level in the express report map
    service.setMapDrillDown(source, shapeId, PP.Mb.DrillMethod.Down, PP.Delegate(onDrillChanged, this));
} else {
    console.log("Move to the lower hierarchy level in the map is not available.");
}

After executing the example the browser console displays a message, that it is not possible to move to lower hierarchy level in the map.

See also:

EaxMapBox