-
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
geojson pick confusion when set perPositionHeight #10091
Comments
@ebogo1 Could you triage this issue by reproducing and seeing if you can find the probable cause? |
@znxd-wh I wasn't able to reproduce this with the GeoJson examples we have in our Sandcastle gallery. Are you able to share the data you were testing this with? Thanks! |
@ebogo1 attach is my code with data, unzip it and publish with a web container such tomcat,iis,nginx. visit the index.html page,you will see the problem. click a feather several times, different feature will be picked. cesium 1.88 does not work,but 1.74 works fine. but if i don't set entity.polygon.perPositionHeight = false,both version work well,when i set entity.polygon.perPositionHeight = false,only version 1.74 works. look forward to your response and thanks |
This looks like a regression in 1.80 from #9399. I think something is going wrong with the first cesium/Source/Shaders/ShadowVolumeAppearanceFS.glsl Lines 73 to 81 in ff34e0c
|
hi @ebogo1 did you mean this bug has appeared since version 1.80?so do you have any idea to fix it? or i do not set the perPositionHeight parameter, but can you please tell me a method to let geojson polygon clamp on 3dtiles model?like the below effect. |
@znxd-wh Yeah, this bug was introduced in 1.80. I edited my first comment with more details. The shader affects all classification types so it's tricky to work out a quick fix. If we have a chance to revisit the issue we'll post updates here. |
I've also had this issue recently handler.setInputAction(function (movement) {
- var pick = viewer.scene.pick(movement.position);
- if (pick) {
- selectedEntity = pick.id;
- pick.id.polygon.material = new Cesium.Color(255, 0, 0, 1)
- }
+ const pickedObjects = scene.drillPick(movement.position);
+ if (pickedObjects) {
+ var pick = pickedObjects.pop();
+ selectedEntity = pick.id;
+ pick.id.polygon.material = new Cesium.Color(255, 0, 0, 1)
+ }
}, Cesium.ScreenSpaceEventType.LEFT_CLICK); |
I've also met this issue and this is the live demo. |
hello
I use GeoJsonDataSource to load geojson data, when i set the perPositionHeight=false,single click on the map to pickup a geojson feathure, it may return a wrong result.
when i set entity.polygon.perPositionHeight = false, it will happen,but if set entity.polygon.perPositionHeight = true, it works fine. this happens with cesium version 1.88, when change cesium version to 1.74,it works fine as well.
following is the code:
The text was updated successfully, but these errors were encountered: