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
    131

    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
    WW Technical Manager
    Join Date
    May 2007
    Location
    Seattle
    Posts
    1,242
    Go To My Homepage: Go to tag's homepage

    Default

    Done. Should be in the public repository shortly.

Tags for this Thread

Bookmarks

Posting Permissions

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