-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
flyToRectangle doesn't work with rectangles that cross the IDL #2093
Labels
Comments
CC #2195 |
Not fixed by #2313. Not important now. |
This works in 3D. What is the expected behavior in 2D/CV? View the whole map? |
I guess what you are asking is which green rect to flyTo, since there are two rects after the IDL split. I think your suggestion of showing the whole map is reasonable. |
Updated code: var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;
var primitives = scene.primitives;
var s = 12.361967086791992;
var w = 158.82334899902344;
var n = 81.638031005859375;
var e = -36.823356628417969;
var rect1 = Cesium.Rectangle.fromDegrees(w,s,e,n);
s = -8.4206666946411133;
w = 16.297948837280273;
n = 81.260665893554688;
e = -163.37794494628906;
var rect2 = Cesium.Rectangle.fromDegrees(w,s,e,n);
primitives.add(new Cesium.RectanglePrimitive({
rectangle : rect1,
material : Cesium.Material.fromType(Cesium.Material.ColorType, {
color : new Cesium.Color(1.0, 0.0, 0.0, 0.75)
})
}));
primitives.add(new Cesium.RectanglePrimitive({
rectangle : rect2,
material : Cesium.Material.fromType(Cesium.Material.ColorType, {
color : new Cesium.Color(0.0, 1.0, 0.0, 0.75)
})
}));
Sandcastle.addToolbarButton('fly red', function() {
scene.camera.flyTo({
destination : rect1
});
});
Sandcastle.addToolbarButton('fly green', function() {
scene.camera.flyTo({
destination : rect2
});
}); |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Sandcastle example. Behavior is different (wrong in all cases) for 3D / CV / 2D.
The text was updated successfully, but these errors were encountered: