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

Issues with Open Layers Draw #655

Open
bbehling-trimble opened this issue Sep 24, 2018 · 16 comments
Open

Issues with Open Layers Draw #655

bbehling-trimble opened this issue Sep 24, 2018 · 16 comments

Comments

@bbehling-trimble
Copy link

Trying to use OL Draw, two issues I noticed so far.

  1. If the 3D cesium map is enabled, the draw 'tools' do not load (highlighted point on mouse cursor, polygon border lines), interactions are not added to the map.
  2. If the Cesium map is not enabled, draw a polygon, then enable the Cesium map. The drawn feature is not placed on the map correctly. The polygon does not stay in place when navigating the map.

Can we draw in 3D mode and can the position of the drawn vector be placed on the map correctly?

@gberaudo
Copy link
Member

At the moment there is no support for interactions in 3d.

  1. interactions are removed from the OL map when 3d is enabled;
  2. I think setting layer.set('altitudeMode', 'clampToGround') on your layer would fix this.

@bbehling-trimble
Copy link
Author

Hi.

Could I make a pull request and try to add 3d map interactions?

@bbehling-trimble
Copy link
Author

layer.set('altitudeMode', 'clampToGround') works for clamping to ground.

Can you explain what the set function does? Is this the ol-cesium preferred method of adding Cesium specific properties to to objects?

@gberaudo
Copy link
Member

Sure @bbehling-trimble, if you can come up with a PR I will look at it.

The OpenLayers set method is setting some properties on the object. Then OL-Cesium check these properties to know how to create the Cesium counterpart for the object.

@SCKgithub
Copy link

We too are facing issues with the vector features not reflecting on Cesium like how it used to happen earlier.
Is this a bug or deprecation

@bbehling-trimble
Copy link
Author

@SCKgithub I was able to draw a feature in 2D mode. When I switched to 3D mode and loaded the Cesium viewer, the polygon was visible and clamped to the terrain. Are you saying you were able to draw in 3D mode at some earlier point?

@SCKgithub
Copy link

SCKgithub commented Oct 17, 2018 via email

@bbehling-trimble
Copy link
Author

@SCKgithub I noticed in native Cesium there are issues with KMLs clamping to terrain.

@SCKgithub
Copy link

SCKgithub commented Oct 18, 2018 via email

@bbehling-trimble
Copy link
Author

@SCKgithub Well, keep in mind that olcesium uses native Cesium behind the scenes. The version of olcesium you are using, could be implementing a version of native Cesium that contains a KML bug.

https://github.com/AnalyticalGraphicsInc/cesium/issues/873

With overlaying vectors, I just followed the OL draw tools example. I drew a polygon in 2D mode, then switched to 3D mode and the drawn vector overlaid without an issue.

I haven't tried adding vectors without the drawing tools though.

https://openlayers.org/en/latest/examples/draw-features.html

@kk1625846601
Copy link

Hello, I want to ask you a question: because cesium can load models and implement movements such as airplane flight. Can olcesium achieve the same functionality?Thank you very much!

@gberaudo
Copy link
Member

@kk1625846601, OL-Cesium is just a wrapper around OpenLayers and Cesium. You can get the Cesium scene using https://github.com/openlayers/ol-cesium/blob/master/src/olcs/OLCesium.js#L461and then use any functionality from Cesium.

@kk1625846601
Copy link

kk1625846601 commented Nov 20, 2019 via email

@kk1625846601
Copy link

@gberaudo Excuse me, my boss asks me to realize the function of flight by using olcesium now, but I still have no idea about it. In cesium,this function needs clockViewModel ,clock and timeline which belong to viewer. In olcesium,I  try to create the three objects and add them to the map,but it doesn't work. Now how can I do by using the scene of olcesium? Thank you very very  much. 

@gberaudo
Copy link
Member

@kk1625846601, you should open a new issue for unrelated discussions.

Do you mean https://cesium.com/docs/cesiumjs-ref-doc/Camera.html#flyTo ?

@kk1625846601
Copy link

kk1625846601 commented Mar 3, 2020 via email

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

No branches or pull requests

4 participants