Using Zoom Function

조회 수: 10 (최근 30일)
Chris
Chris 2011년 6월 14일
What I'm trying to do is pull a static image from google maps and then update it based on if the user zooms in on a particular location with a higher resolution picture of the zoomed in area.
My issue is that I'm not exactly sure from the documentation how the zoom method works when an area to be zoomed in on is boxed rather than clicked. If clicked the default zoom is 2x, is there a default zoom for the box? Or is there a function or easy way of calculating this zoom level?

채택된 답변

Titus Edelhofer
Titus Edelhofer 2011년 6월 14일
Hi,
you will need to implement a post-zoom callback. Take a look at the doc for zoom and there especially at Example 5: it shows how to execute a callback after the zoom (use xlim and ylim to get the "new" zoomed in area).
Titus

추가 답변 (1개)

Chris
Chris 2011년 6월 14일
Okay, that makes sense. Thank you.
Also, what I decided to do was have size = axis, then call the components of the 1x4 size matrix to manipulate the figure that way I was intending. Again, thanks a bunch!

카테고리

Help CenterFile Exchange에서 Data Exploration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by