-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rotatable 2D map #3990
Rotatable 2D map #3990
Conversation
@bagnell we'll test now and ship in 1.22 if nothing jumps up. |
When this is merged, can you also update the forum post(s) where users were asking about this. |
@@ -446,6 +447,63 @@ defineSuite([ | |||
expect(camera.frustum.bottom).toEqual(-camera.frustum.top); | |||
}); | |||
|
|||
it('rotate counter-clockwise in 2D', function() { | |||
setUp2D(); | |||
scene.rotatable2D = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this property readonly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this overwrites the property get function with the boolean? Perhaps it is more obvious to assign to _ rotatable2D
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't a real Scene
instance. A MockScene
is created before each test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, OK.
Although it will be trivial, I think this is an important enough example that it should have a Sandcastle example. |
Otherwise, this is a masterpiece. |
I just found two issues after I made the Sandcastle example. The home button doesn't reorient the camera and setting the scene mode on viewer construction shows a blank canvas. I'll let you know when they're fixed. |
Should we add back the ability to set the heading from I would also probably call the flag This might be overkill, but maybe have an enum for the 2d mode with the options infinite scroll or rotate. That way it's obvious you only get one of those options. |
Yeah, I thought about this too. It's probably the right move. If the scope here is too big, it is not really needed for 1.22. |
@pjcozzi This is ready for another look. |
@@ -36,6 +36,7 @@ Change Log | |||
* Added `CullingVolume.fromBoundingSphere`. | |||
* Added `debugShowShadowVolume` to `GroundPrimitive`. | |||
* Fix issue with disappearing tiles on Linux. [#3889](https://github.com/AnalyticalGraphicsInc/cesium/issues/3889) | |||
* Add a `rotatable2D` option to to `Scene`, `CesiumWidget` and `Viewer` to enable a rotatable map in 2D. [#3897](https://github.com/AnalyticalGraphicsInc/cesium/issues/3897) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update this to reflect the recent changes and move to 1.23.
That's my only comment. @hpinkos anything else? We will merge after the 1.22 release. |
looks good to me! 👍 |
Add a
rotatable2D
option to toScene
,CesiumWidget
andViewer
to enable a rotatable map in 2D.Fixes #3897.