naql
05-30-2008, 12:12 AM
First, thanks for the new release! My most pressing issue was resolved in that I am now able to jump directly to a location.
But, I've noticed something odd: my zooming often gets "stuck", often exactly at the 1000km level, but at other altitudes as well. The symptom is that as I'm scrolling the mouse wheel, zooming slows and then seems to stop. It's not the mouse wheel though; I can't zoom in further using the keyboard or both mouse buttons/drag either. It seems to happen predictably after clicking on the WorldMap layer to pan/iterate to a new position. (I've been playing with it as I compose this to see how to duplicate.)
If I screw around with the pitch, heading, and drag around a bit, I can clear the condition and then I can resume zooming in closer.
OK, so it seems to be related to the WorldMapLayer, so I noticed that there is the setup code for the SelectListener there in my applet init method and in comparing this to the new applet example, I can see one difference there:
view.applyStateIterator(FlyToOrbitViewSt ateIterator.createPanToIterator(
// The elevation component of 'targetPos' here is not the surface elevation,
// so we ignore it when specifying the view center position.
view, globe, new Position(targetPos.getLatLon(), 0),
Angle.ZERO, Angle.ZERO, targetPos.getElevation()));
...so, I originally had this code, which didn't compile due to the changes in the createPanToIterator method signature:
// Use a PanToIterator
view.applyStateIterator(FlyToOrbitViewSt ateIterator.createPanToIterator(
view, globe, new LatLon(targetPos.getLatitude(), targetPos.getLongitude()),
Angle.ZERO, Angle.ZERO, targetPos.getElevation()));
which I resolved by just using the Position targetPos created a few lines above to get something that compiled error free:
view.applyStateIterator(FlyToOrbitViewSt ateIterator.createPanToIterator(
view, globe, targetPos,
Angle.ZERO, Angle.ZERO, targetPos.getElevation()));
Aha! Now the WorldMap later pans me over to an altitude of 1000km, whereas with my broken code it took me to 2000 km apparent altitude. The diff being because the WorldMap has this...
private double pickAltitude = 1000e3; // Altitude for picked position
OK, got it. That fixes the problem. The FIRST code snippet above is how it should be. Sorry to think/debug out loud, but since I typed this whole thing left-handed with a bum right hand, I'll post it anyway in the hope it helps someone else avoid my mistake.
But, I've noticed something odd: my zooming often gets "stuck", often exactly at the 1000km level, but at other altitudes as well. The symptom is that as I'm scrolling the mouse wheel, zooming slows and then seems to stop. It's not the mouse wheel though; I can't zoom in further using the keyboard or both mouse buttons/drag either. It seems to happen predictably after clicking on the WorldMap layer to pan/iterate to a new position. (I've been playing with it as I compose this to see how to duplicate.)
If I screw around with the pitch, heading, and drag around a bit, I can clear the condition and then I can resume zooming in closer.
OK, so it seems to be related to the WorldMapLayer, so I noticed that there is the setup code for the SelectListener there in my applet init method and in comparing this to the new applet example, I can see one difference there:
view.applyStateIterator(FlyToOrbitViewSt ateIterator.createPanToIterator(
// The elevation component of 'targetPos' here is not the surface elevation,
// so we ignore it when specifying the view center position.
view, globe, new Position(targetPos.getLatLon(), 0),
Angle.ZERO, Angle.ZERO, targetPos.getElevation()));
...so, I originally had this code, which didn't compile due to the changes in the createPanToIterator method signature:
// Use a PanToIterator
view.applyStateIterator(FlyToOrbitViewSt ateIterator.createPanToIterator(
view, globe, new LatLon(targetPos.getLatitude(), targetPos.getLongitude()),
Angle.ZERO, Angle.ZERO, targetPos.getElevation()));
which I resolved by just using the Position targetPos created a few lines above to get something that compiled error free:
view.applyStateIterator(FlyToOrbitViewSt ateIterator.createPanToIterator(
view, globe, targetPos,
Angle.ZERO, Angle.ZERO, targetPos.getElevation()));
Aha! Now the WorldMap later pans me over to an altitude of 1000km, whereas with my broken code it took me to 2000 km apparent altitude. The diff being because the WorldMap has this...
private double pickAltitude = 1000e3; // Altitude for picked position
OK, got it. That fixes the problem. The FIRST code snippet above is how it should be. Sorry to think/debug out loud, but since I typed this whole thing left-handed with a bum right hand, I'll post it anyway in the hope it helps someone else avoid my mistake.