Why do it?

On a LuciadRIA map with a non-geographic reference, you want to fit tightly around the data so that no screen real estate is wasted and the entire map screen shows relevant data.

The default LuciadRIA fit leaves some padding, so there is no tight fit on data. It also preserves the scale ratio between the X and Y axes before and after the fit. As a result, there may be a lot of excess space either at the top or the bottom, or on the left or the right of the map after a fit.

How to fit tightly around data?

If these conditions are true:

  • The map has a reference of CoordinateType.CARTESIAN where the unit of measure on one axis is independent of the unit of measure on the other axis

  • The data can be stretched or compressed

Set the allowWarpXYAxis parameter to true when you call the map.mapNavigator.fit method.

Do NOT set this parameter to true when the map shows geographic data.

In other words, the parameter is really only useful when you are using a map to create a scatter plot or a vertical view, for example. The result of a tight fit is that the X and Y scales of the map are not identical.

Examples

  • Fitting on the bounds of a flight trajectory when the warping parameter has been set to true. Note that the data is being stretched to fit the entire screen.

    warping true
  • Fitting on the bounds of a flight trajectory when the warping parameter has been set to false. Note the excess white space on the left and on the right. In this case, the scale ratio between the X and Y axis is the same before and after the fit.

    warping false