Results 1 to 2 of 2

Thread: Fire Event for zoom change -> cannot override BasicOrbitView.setModelCoordinates()

  1. #1
    Senior Member
    Join Date
    Jan 2012
    Posts
    132

    Default Fire Event for zoom change -> cannot override BasicOrbitView.setModelCoordinates()

    Hi there,

    I would like to be informed whenever the zoom (which seems to equal the elevation of the eyePosition for the most part) changes. However, there seems to be no Event which could be listened for.

    So I want to write a subclass of BasicOrbitView, which overrides the three methods that can change the zoom setEyePosition(), setModelCoordinates(), and setZoom(), so that they fire a PropertyChangeEvent which I can listen for. Example:

    Code:
    @Override
    public void setZoom(double zoom) {
     double oldZoom = this.zoom;
     super.setZoom(zoom);
     firePropertyChange(someZoomString, oldZoom, this.zoom);
    }
    Unfortunately, I cannot do the same for the method
    setModelCoordinates(OrbitViewInputSuppor t.OrbitViewState modelCoords)
    because OrbitViewState is a protected nested class inside OrbitViewInputSupport which I cannot access from outside the WorldWind package.

    Is there any way to set OrbitViewState to public in WorldWind 1.3 or to handle this situation in another way?

    Thanks!

  2. #2
    WWJ Technical Manager
    Join Date
    May 2007
    Location
    Seattle
    Posts
    1,121

    Default

    Done. Should be in the public repository shortly.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Fire event on addRenderable?
    By heidtmare in forum Development Help
    Replies: 1
    Last Post: 08-18-2011, 09:15 AM
  2. Change to DRAG select event handling
    By tag in forum Feature Discussion
    Replies: 1
    Last Post: 06-22-2011, 11:41 PM
  3. elevation model change - notification event
    By caller in forum Development Help
    Replies: 0
    Last Post: 05-25-2011, 10:10 AM
  4. zoom and latitude change
    By haddazi in forum Development Help
    Replies: 1
    Last Post: 11-14-2007, 04:04 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •