Using ButtonDownFcn w/ mapshow() in GUI
이전 댓글 표시
Hi,
I'm just starting to experiment w/ the GUI capabilities of MATLAB. I'm building a simple GUI which will allow for the display and manipulation of geotiffs and shapefiles. For testing purposes I created a bare-bones GUI which includes an axes object and a pushbutton. The button does nothing more than simply call mapshow() on a geotiff and shapefile at this point, but I was happy to see them displayed properly in the axes object.
Now on to my question: the next thing I wanted to play with was displaying the easting and northing location underneath the mouse cursor when a mouse button is clicked. So, I used GUIDE to define a ButtonDownFcn callback for the axes object. In the code I query the current point and update a couple of static text objects.
However, this callback only gets hit when I click on the axes object prior to displaying the geotiff/shapefile via mapshow(). Before calling mapshow() the callback works as expected. Once I call mapshow() the callback does not get called when I click over the image.
What is the proper way to specify callbacks when using mapshow()? Or is there a more appropriate way altogether to use mapshow capabilities within a MATLAB GUI?
Thanks!
-- Dan
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Vector and Raster Map Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!