Results 1 to 2 of 2

Thread: zoom and latitude change

  1. #1
    Junior Member
    Join Date
    Oct 2007

    Default zoom and latitude change

    I have a property change event listener added to the view. Using the mouse wheel to zoom in (out) about 2000 event are generated however most the values are identical except for a small difference in latitude value of the view. This is not a performance issue however I catch the event to drive another client. Even after the zoom value level off more events are generated with a small change in the latitude value. Following is the debug statement from 2 consecutive property change events. Is it expected to see a latitude change when the zoom is changing (all other values do not change only the latitude change).

    =================state change=============
    old state:
    com.ngc.worldwind.WorldWindViewState Object {
    latitude: 38.07266971910206
    longitude: -119.99999999999999
    zoom: 9989025.468867224
    pitch: 1.288632668786364E-4
    heading: 0.0
    new State:
    com.ngc.worldwind.WorldWindViewState Object {
    latitude: 38.0726695046073
    longitude: -119.99999999999999
    zoom: 9989073.737495907
    pitch: 1.288632668786364E-4
    heading: 0.0

  2. #2
    WWJ Dev. Team
    Join Date
    May 2007


    In this case very small changes to latitude or longitude are expected (we're talking 7th decimal place to the right here).

    We work with viewing transforms in Cartesian space, then translate back to geodetic. In Cartesian space the values are very large, occasionally resulting in floating point rounding "errors". You see this as latitude changing when you didn't ask it to.

    If this problem becomes significant, there is hope. We may eventually define a way to work with view transforms that doesn't suffer from this problem.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Zoom to extent
    By Unregistered in forum Development Help
    Replies: 7
    Last Post: 12-20-2007, 08:26 PM

Posting Permissions

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