ButtonDownFcn on geoscatter disables panning

조회 수: 2 (최근 30일)
Malte Nagel
Malte Nagel 2022년 4월 5일
답변: Malte Nagel 2022년 4월 6일
I have built an application in App Designer that plots points on a geoaxis object using geoscatter. However, if I set the ButtonDownFcn of the returned Scatter object, panning iand zooming are disabled in the geoaxes. I didn't modify the properties of the geoaxes object. If I remove the line setting the ButtonDownFcn property, panning works again.
s = geoscatter(gx, lat, lon, 50, 'green', 'Marker', 'x');
s.ButtonDownFcn = @app.PointClickedCallback;
Could someone explain to me why this happens and how to prevent this?

채택된 답변

Malte Nagel
Malte Nagel 2022년 4월 6일
I am still not sure what caused the issue, but adding this line before setting the callback function worked:
enableDefaultInteractivity(gx);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geographic Plots에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by