Skip to content
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

Merged
merged 10 commits into from
Jun 1, 2016
Merged

Rotatable 2D map #3990

merged 10 commits into from
Jun 1, 2016

Conversation

bagnell
Copy link
Contributor

@bagnell bagnell commented Jun 1, 2016

Add a rotatable2D option to to Scene, CesiumWidget and Viewer to enable a rotatable map in 2D.

Fixes #3897.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 1, 2016

@bagnell we'll test now and ship in 1.22 if nothing jumps up.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 1, 2016

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;
Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, OK.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 1, 2016

Although it will be trivial, I think this is an important enough example that it should have a Sandcastle example.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 1, 2016

Otherwise, this is a masterpiece.

@bagnell
Copy link
Contributor Author

bagnell commented Jun 1, 2016

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.

@hpinkos
Copy link
Contributor

hpinkos commented Jun 1, 2016

Should we add back the ability to set the heading from Camera.flyTo and Camera.setView in 2D when rotatable2D: true?

I would also probably call the flag rotate2D instead of rotatable2D.

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.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 1, 2016

This might be overkill, but maybe have an enum for the 2d mode with the options infinite scroll or rotate.

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.

@bagnell
Copy link
Contributor Author

bagnell commented Jun 1, 2016

@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)
Copy link
Contributor

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.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jun 1, 2016

That's my only comment.

@hpinkos anything else?

We will merge after the 1.22 release.

@hpinkos
Copy link
Contributor

hpinkos commented Jun 1, 2016

looks good to me! 👍

@pjcozzi pjcozzi merged commit fe62669 into master Jun 1, 2016
@pjcozzi pjcozzi deleted the rotate-2D branch June 1, 2016 23:45
@hpinkos hpinkos mentioned this pull request Jun 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants