How-to configure the Measure tool

The measure tool is managed as a part of the ServiceManager component. Therefore, all the options for the measure tool are passed in as options to the ServiceManger component when it’s added to the application.

Here’s the example from the demo:

    app.add(gm3.components.ServiceManager, 'service-tab', {
        services: true,
        measureToolOptions: {
            pointProjections: point_projections
        }
    });

Example of setting the default units to meters

The code below will set the default the measurement units to meters instead of feet.

    app.add(gm3.components.ServiceManager, 'service-tab', {
        services: true,
        measureToolOptions: {
            pointProjections: point_projections,
            initialUnits: 'm'
        }
    });