Main Content

GeographicAxesInteractionOptions Properties

Geographic axes interaction behavior for apps

Since R2024a

GeographicAxesInteractionOptions properties control the behavior of geographic axes interactions for apps. By changing property values, you can customize the behavior of all associated geographic axes interactions. Use dot notation to query and set properties.

f = uifigure;
gx = geoaxes(f);
gx.InteractionOptions.ZoomSupported = "off";

The options set by the GeographicAxesInteractionOptions object apply to these interactions on the associated axes:

  • The built-in interactions specified by the Interactions property of the geographic axes

  • Interactions enabled using the geographic axes toolbar

The properties listed here are valid for geographic axes in figures created with the uifigure function.

Supported Interactions

expand all

Bounded zoom indicator, specified as "on" or "off", or as numeric or logical 1 (true) or 0 (false). A value of "on" is equivalent to true, and "off" is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

If PanSupported is "off", the pan interaction is not included in the default interactions of the geographic axes.

Example: gx.InteractionOptions.PanSupported = "off"

Zoom support indicator, specified as "on" or "off", or as numeric or logical 1 (true) or 0 (false). A value of "on" is equivalent to true, and "off" is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

If ZoomSupported is "off", the zoom interaction is not included in the default interactions of the geographic axes.

Example: gx.InteractionOptions.ZoomSupported = "off"

Data tip support indicator, specified as "on" or "off", or as numeric or logical 1 (true) or 0 (false). A value of "on" is equivalent to true, and "off" is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

If DatatipsSupported is "off", the data tip interaction is not included in the default interactions of the geographic axes and the data tip mode is not supported.

Example: gx.InteractionOptions.DatatipsSupported = "off"

Interaction Display

expand all

Method for placing data tips, specified as one of these values:

  • "vertex" — Hover to preview or click to create a data tip at the closest data point to the cursor location. The closest data point depends on the type of plot. For example, on a plotted curve, the closest data point is the data point with the smallest Euclidean distance from the specified location.

  • "interpolate" — Hover to preview or click to create a data tip at the closest interpolated location on the plot to the cursor location, even if it is between data points.

Example: gx.InteractionOptions.DatatipsPlacementMethod = "interpolate"

Restore View

expand all

Minimum and maximum limits for the restored view of the geographic axes, specified as a two-element vector of the form [min max], where max is greater than min. The geographic axes limits are set to [min max] when you restore the geographic axes view using the Restore View button in the geographic axes toolbar.

You can specify the limits as numeric values in the interval [–90, 90].

Note

The limits used for restoring the geographic axes view are typically wider than the limits you specify, to maintain the aspect ratio of the map.

Example: gx.InteractionOptions.RestoredLatitudeLimits = [47.62 61.2]

Example: gx.InteractionOptions.RestoredLongitudeLimits = [-149.9 -122.33]

Version History

Introduced in R2024a