-
Notifications
You must be signed in to change notification settings - Fork 327
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
Core: OLCesium constructor + camera #8
Comments
To be done: Wrapper accept option |
We also decided to remove the ol3cesium factory and replace it with a constructor (name to be defined), for consistency with ol3. |
Illustration added to the specification above. |
Wrapper around Cesium which takes care of the following synchronizations:
From ol3 to cesium (one way) will be synchronized:
Additionally, the cesium interactions (modifying camera position and properties) will also automatically modify the ol.View properties (center, resolution, rotation) -- details in #9.
The constructed object (returned by the
ol3cesium
factory) will provide additional methods specific for the 3D environment:.set/getRoll()
- in radians as in ol3 - or possibly in degrees?.set/getTilt()
- in radians?.set/getHeading()
- in radians?, this is in fact shortcut for rotation on ol.View.set/getDistance()
- meters - from target of view.set/getAltitude()
- absolute height of camera above ellipsoid in meters.set/getCenter()
- this is in fact shortcut for center on ol.View (but without change of angles) (Update: originally named set/getTarget)..set/getPosition()
- position of camera.lookAt()
- camera stays on same position and is rotated to point at the specified targetall accepting/returning
ol.Coordinate
Access to the underlying Cesium.Scene instance for native calls via Cesium API:
.getCesiumScene()
Calls on Cesium API are possible but can desynchronize state of ol3 and cesium.
Synchronization from Cesium view set otherwise back to OL3 is implemented only for Camera->View - and is done automatically or by calling
.updateView()
in #9 (update: originally syncView)No major modifications of the ol3 are required.
ol3cesium is compiled with Closure Advanced.
Cesium API is called via externs.
In the initial implementation we try to use only exported functions of ol3 api (via externs for complete separation).
User should be by loading 3 js files: ol3, cesium, ol3cesium.
The advanced compilation of ol3 together with the ol3cesium wrapper may be used, if unexterned ol3 methods must be called.
Theoretically an application can be build together with ol3+ol3cesium in advanced mode to produce a single minimized .js file.
Update: the ilustration of Camera interaction:
SVG for printed documentation or presentations:
https://gist.github.com/klokan/d703a2cd40ec65a9a3e7
https://rawgit.com/klokan/d703a2cd40ec65a9a3e7/raw/9f2326d1677931b2b4bafa1aa8bfb47aa7222cb8/ol3cesium_camera.svg
The text was updated successfully, but these errors were encountered: