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

DrillPick on 2D map broken based on zoom level #8052

Open
bkazuto opened this issue Aug 9, 2019 · 2 comments
Open

DrillPick on 2D map broken based on zoom level #8052

bkazuto opened this issue Aug 9, 2019 · 2 comments

Comments

@bkazuto
Copy link

bkazuto commented Aug 9, 2019

When you have a 2D map enabled and you try to use the drillpick or pick methods the results will either be correct or empty depending on the zoom level of the map. It seems like the more zoomed out you are it can say there are 0 things picked, but if you zoom in it will correctly detect things. This doesn't seem to be an issue with the 3D map.

Expected Behavior of Sandcastle:

  • Have a mouse move handler that will call drillPick whenever moved and print to the console the results

Instructions to replicate in sandcastle below:

  1. Enable the console tab of the sandcastle.
  2. Move cursor around the map. Move cursor on the striped rectangle on top of Australia. You will observe that the drillpick is recording nothing in the console.
  3. Zoom in and move the mouse. After passing some random threshold you will start seeing messages in the console for drillpick results that correspond to the rectangle entity.
  4. Zoom out again and the console messages stop.

Tested Environments:

  • CentOS Desktop + Chrome + NVIDIA GPU
  • Windows 10 Laptop/Desktop + Firefox + Some GPU
  • Windows 10 Desktop + Firefox + Chrome + GTX 1080 Ti

I can't confirm if we've had this issue with older versions of cesium

This is pretty critical for what we are doing since our maps default in 2D mode and the drillpick is the basis for basically all of our event handling. A fix would be great, but if there is a known workaround we would gladly take it

Thanks

https://cesiumjs.org/Cesium/Build/Apps/Sandcastle/#c=dVNdT+MwEPwrVl9IpeJ+IF4gVHdXIoFEr9UFuJdIJ2Nvi4VjR7YTlEP979hxQ9L2bvNgez07mh1vKqJRxeEdNLpBEt7RAgwvc/zc5KIz2hwXSlrCJeizEfpAhoKEpWJw1aLTNoPTRfIzmd2i3fA6k5kM1JiSHDTBBqznjT4yifbBwFguieVKoi+6BdHW7Yi8wBut8lvYagATdVU+prPZ6DBzfpK5mITossOwPZQH0nLLwWDCWCtOA7VEbgU4WT29VCnNvGAwnd5fLfZA7nQ2wZORU3Xpl2lYzn1y2JOZOyrNiXBsPftTq3kBy/3dWqsCtK37xvmACuRCCaU75/wJ/767f0yOrFCM/Qv64+HpGKmhAGKv0GWX3rW2ZXLv3KaUtHm0XJXGPX0FkVdjh96sAK7caDXO1m609k43o4OZ5kKsOX0LNdhY9+BrZbhnDPzBa2mUM1WobRSIwt2ueTrH/kokE8eTm1LnvkwLQiHx7HcBFB0ooMQRmEDnvz2Tn9B7WZT2e9Nc1Cppu/3q8bTt3agF/0fHY10AXq6e0uTPcvWcePTwejAaxMbWAuah9hvPC6UtKrWIMB5byAvhZ238UtI3sJiaRnQ8botixivE2U02OPpTswGighjjbjalECn/C9lgHo8d/qBMKOLmebuqQAtSe8jrdP4QkhjjeOyOp1VWKfFCdI/xEw

@OmarShehata
Copy link
Contributor

OmarShehata commented Aug 9, 2019

Thanks for providing a code example. Looks like this worked in 1.45, and seems to have broken in 1.46, somewhere in this PR: #6393

Here's an easy way to test old releases of CesiumJS. Here's it working in version 1.45.

A git bisect shows this commit is responsible: 3e5c724.

Initially I thought it was related to #7908, which was the exact same problem, but this seems to be a different underlying cause. @likangning93 any ideas?

@OmarShehata
Copy link
Contributor

OmarShehata commented Aug 9, 2019

Actually, one workaround @likangning93 just mentioned offline is giving the rectangle entity a height: 0, so it's not clamped to ground, which fixes it (if you're OK with having your entity not clamped to the terrain).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants