On Dec 12, 2007 2:58 PM, Alexey Pavlenko <[EMAIL PROTECTED]> wrote: > Hi, > I'm using JMapPane. > Added ZoomIn/Out actions there: > JMapPane m_mapPane ... > Action zoomIn = new ZoomInAction(m_mapPane); > ... > Is there any ability to listen to Zoom In/Out actions on JMapPane?
The simple answer is no. I > found some 'zoomFactor' in JMapPane, but it didn't changed when I > Zoomed In/Out. That's the factor that the map scale changes for a single click so it should be constant in most applications. Also in docs I found ZoomPane, ZoomChangeEvent, > ZoomChangeListener. But I should change my m_mapPane to ZoomPane type > to use that. Those are very old classes that I don't think any one uses any more (or they are very new and I don't know anything about them either) I'm looking for best solution. > For quick solution I can listen to mouse events on JMapPane, then > check JMapPane's state... But 1) it's rather ugly; 2) this way I don't > know current scale. > Please help me, I have spend much time for it, but still can't solve > this problem. I think you could listen to change events from the underlying mapcontext, have a look in the demo of map pane for an example I think. Ian -- Ian Turton http://www.geotools.org http://pennspace.blogspot.com/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
