Plotting gps coordinates in Appdesigner

49 ビュー (過去 30 日間)
Francesco Carraro
Francesco Carraro 2020 年 4 月 5 日
コメント済み: Neha Sardesai 2020 年 5 月 22 日
Hello everyone,
I have to plot a map in gps coordinates inside a UIAxes in Appdesigner, but using "geoplot" function the app plots the map in an other image outside the App. I tried give "app.UIAxes3" (which is the graph where I want to plot gps coordinates) as first argument of the function, but Matlab gives error saying that I have to use latitudinal/longitudinal coordinates.
Here is the code, and an image showing the map outside the app, instead i want the map in the UIAxes marked in red
%Function to plot TrackMap
function results = geoplotter(app)
app.track=geoplot([app.lat],[app.lon])
end
Maybe is there another way to write geoplot function in appdesigner or a different functions to read and plot map in gps coordinates?
Many Thanks

採用された回答

Harsha Priya Daggubati
Harsha Priya Daggubati 2020 年 4 月 8 日
Hi,
Starting in R2018b, you can create additional plots in App Designer. Most of these plots require a different type of parent object and additional lines of code in your app. All of them use normalized position units by default.
For your case,
Create the geographic axes by calling the geoaxes function. Specify the parent container as the first input argument (for example, app.UIFigure). Then, call the plotting function with the axes as the first input argument. For example:
latSeattle = 47 + 37/60;
lonSeattle = -(122 + 20/60);
gx = geoaxes(app.UIFigure);
geoplot(gx,latSeattle,lonSeattle)
This might help you!
  6 件のコメント
Juan Guamán
Juan Guamán 2020 年 4 月 15 日
it doesn't work on uiaxes please help me
Neha Sardesai
Neha Sardesai 2020 年 5 月 22 日
You can use a panel or tab instead of UIAxes. This link should be helpful.

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by