Drawpolygon not working with geoaxes
10 views (last 30 days)
I am developing a GUI with app designer, when I want to enable users to select a region interactively on a geoaxes. I am using the drawpolygon function, which does not seem to work with geoaxes (it works on a regular axis). I get following error:
Warning: Error occurred while executing the listener callback for event WindowMousePress defined for class matlab.ui.Figure:
Dot indexing is not supported for variables of this type.
Error in imageslib.internal.app.utilities.isAxesInteractionModeActive (line 17)
TF = ax.InteractionContainer.CurrentMode ~= "none";
Error in images.roi.internal.ROI/isModeManagerActive
Error in images.roi.internal.ROI/waitForButtonPressToBegin
Error in images.roi.internal.ROI
is drawpolygon not available for geoaxes or is there an option I need to set correctly for this axes type. Any help would be appreciated.
Adam Danz on 6 Oct 2022
This is supported in the latest release, MATLAB R2022b.
The example below produced the results you described when run in R2022a but is functional in R2022b.
uif = uifigure();
gx = geoaxes(uif);