フィルターのクリア

How do I remove a geoaxes map from GeoPanel

5 ビュー (過去 30 日間)
Gregory Crabtree
Gregory Crabtree 2023 年 10 月 4 日
コメント済み: Dyuman Joshi 2023 年 10 月 6 日
When I reset geographic boundaries and reload the map, it loads over the top of the previous one. I can get a handle to both the GeoPanel container and the geoaxis, but cannot figure out how to close the current map before loading a new one.
gx = geoaxes('parent',app.GeoPanel);
geoplot(gx,app.SensorsArea,'*',MarkerEdgeColor=[0.635 0.078 0.184]);
geolimits(gx, app.EventIn.lat, app.EventIn.lon);

回答 (1 件)

檮杌
檮杌 2023 年 10 月 5 日
編集済み: 檮杌 2023 年 10 月 5 日
Would cla work for you? cla clears current axis and it should work for geoaxes too.
gx = geoaxes;
latSeattle = 47.62;
lonSeattle = -122.33;
latAnchorage = 61.20;
lonAnchorage = -149.9;
geoplot(gx,[latSeattle latAnchorage],[lonSeattle lonAnchorage],'g-*')
geobasemap(gx,'colorterrain')
cla % this clears previous results and sets back to default
  2 件のコメント
Gregory Crabtree
Gregory Crabtree 2023 年 10 月 5 日
Thank you for the suggestion, but no. cla does remove any points, lines, and polygons plotted. However, it leaves behind the map, lat and long axis, etc.
I had also tried clf and close, but those apparently only work with figures.
Dyuman Joshi
Dyuman Joshi 2023 年 10 月 6 日
It might not work because you are working with an App.
Could you share the code you are working with?

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

タグ

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by