Disabled Interactions For Geoaxes In App Designer

14 ビュー (過去 30 日間)
Dylan
Dylan 2025 年 10 月 22 日 18:53
コメント済み: Cris LaPierre 2025 年 10 月 24 日 21:28
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 件のコメント
Voss
Voss 約14時間 前

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

サインインしてコメントする。

回答 (1 件)

Cris LaPierre
Cris LaPierre 2025 年 10 月 23 日 13:11
編集済み: Cris LaPierre 2025 年 10 月 23 日 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.
  2 件のコメント
Dylan
Dylan 約18時間 前
編集済み: Dylan 約18時間 前
I got the example working for me now when I started on a fresh new app. I have however discoverd why it was not working for me. Whenever I make a callback function for the WindowsButtonMotionFcn for the UIFigure, it disables all the interactions. I use this because I want a crosshair to show up while the user hovers over the map and also display the current lat/lon live in a text field. Is there a way around this? Id like to keep these features for my users. Thanks!
Cris LaPierre
Cris LaPierre 約16時間 前
How are you creating the crosshairs?
However, in a quick test, I couldn't get the functionality of both at the same time. There may be other ways, but it might be necessary to use a different approach. Tagging @Adam Danz

サインインしてコメントする。

カテゴリ

Help Center および File ExchangePolar Plots についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by