Disabled Interactions For Geoaxes In App Designer

22 vues (au cours des 30 derniers jours)
Dylan
Dylan le 22 Oct 2025 à 18:53
Commenté : Dylan il y a environ 12 heures
I am trying to get zoom, pan, and datatips working on geoaxes in app designer but it is not working. Whenever I use geoaxis outside of app designer, all the interactions work perfectly just like how you would expect. I am trying to follow this tutorial https://www.mathworks.com/help/matlab/creating_plots/create-geographic-axes-in-app.html but instead of setting PanSupported and ZoomSupported to "off", intuitively, you would think to set it to "on" to enable interactions. Unfortunately, this is not the case. I have been all over the internet and back and have not seen a workable clean solution to this problem. The only work around I see is to trigger a new figure from the app that has all of these interactions. I do not want that and need it to happen inside of my app. For panning and zooming, I have been simulating these functions with buttons and sliders. No idea how to simulate datatips when hovering over geoplots in a clean way. This makes the app a lot less user friendly and harder to use.
  1 commentaire
Voss
Voss le 23 Oct 2025 à 18:20

It may be helpful if you upload your mlapp file here, using the paperclip icon.

Connectez-vous pour commenter.

Réponses (1)

Cris LaPierre
Cris LaPierre le 23 Oct 2025 à 13:11
Modifié(e) : Cris LaPierre le 23 Oct 2025 à 13:11
By default, pan and zoom are enabled. This app example explicitly turns them off. Delete or Comment out lines 73 and 74 in the app, and you will see zoom and pan options in the axes toolbar, as well as data tips.
The axes toolbar will appear in the top right of the axes. You may have to click on the plot first to activate it.
  4 commentaires
Adam Danz
Adam Danz il y a environ 8 heures
Assigning the WindowButtonMotionFcn function disables pan/zoom interactions in geoaxes. This is a known limitation. I've noted your use of data tips and other interactions during window button control - thanks for sharing it.
For potential workarounds:
Dylan
Dylan il y a environ 8 heures
@Cris LaPierre I am grabbing my current point in the geoaxis if it exists using geoaxis.CurrentPoint. If it is within the lat and lon limits of my geoaxis component, I then update two geoplots with lines (one horizontal and one vertical) that extends to the limits of the axis. It then erases when it detects that my mouse is no longer hovering over the geoaxis object. At the same time it grabs the current points while inside of the axis component and prints out my current lat/lon.
@Adam Danz That is unfortunate. Are there any plans to fix this limitation? I will try using listeners to rectify this problem. Ill keep this form updated if I am succesful.
Thanks for the support!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Polar Plots dans Help Center et File Exchange

Produits


Version

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by