You can reproduce it on every demo on cesium website, like this one:
http://shinsai.mapping.jp/index_en.html
It works on Opera and Firefox
Google Chrome Version: ‘49.0.2623.87 m’
scene.pick(click.position) with the click position returns undefined
hannah
March 17, 2016, 2:50pm
2
Hello,
I’m not sure what would be causing that problem. Please follow these steps and tell me what happens:
• Run chrome in incognito mode (you can open an incognito window using ctrl+shift+n)
• From the incognito window, go to http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Hello%20World.html&label=Showcases
• Replace the code in the left pane with this example:
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var entity = viewer.entities.add({
position : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
billboard : {
image : ‘…/images/Cesium_Logo_overlay.png’
}
});
var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
handler.setInputAction(function(movement) {
var pickedObject = viewer.scene.pick(movement.endPosition);
if (Cesium.defined(pickedObject) && (pickedObject.id === entity)) {
entity.billboard.scale = 2.0;
entity.billboard.color = Cesium.Color.YELLOW;
} else {
entity.billboard.scale = 1.0;
entity.billboard.color = Cesium.Color.WHITE;
}
}, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
``
• Hit the ‘Run’ button, then mouse over the logo that has been added to the globe.
Does the logo change when you hover over it? If not, are there any errors in the console?
What OS and graphics card does your computer have?
Thanks
-Hannah
Thank you Hannah.
Unfortunatelly the logo not hover and i get no errors in the javascript console.
Simple nothing occours.
I´m my system i have this code:
var handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
handler.setInputAction(function(click) {
console.log('clicked!');
var pickedObject = scene.pick(click.position);
console.log(pickedObject);
if (Cesium.defined(pickedObject))
{
.......
}, Cesium.ScreenSpaceEventType.LEFT_CLICK);
Notice that first console.log give me sure Cesium hit the click event, because it return "clicked!" in the console, but the second one returns "undefined" for the pickedObject.
Its Google Chrome updated with last version and i´m using graphic card RADEON HD 6800.
Some totally different machines give the same error, about 5% of all machines we have in our department. Not so much in numeric terms but important machines are not working.
hannah
April 28, 2016, 12:18pm
4
Very strange, I’ve never seen that problem before. Are they Windows, Mac or Linux machines?
-Hannah
I get this same exact issue with my latest Chrome (50.0.2661.94m)
Works fine in Firefox, but can't get scene.pick to work in Chrome at all anymore. Even tried the incognito test and it still fails.
No error return, just doesn't pick.
Works fine on other machines in office.
I'm in Windows 7 Pro, with a AMD RADEON HD 6350
I'm having the same issue.
Chrome 50.0.2661.94 m (64-bit)
AMD Radeon(TM) HD 8490, driver: 13.351.1007.1006
Are you using terrain? Does it work if you disable terrain? I think you are running into this bug: https://github.com/AnalyticalGraphicsInc/cesium/pull/3900
Which has been fixed and will be in the next release (1.22 on June 1st)
Tried disabling terrain and still returns null. But I will be happy to wait for the next release to see if it's fixed anyway!
in our department we start to solve doing update the video driver and all windows updates.
i'm not sure if this way solve in all machines, i will confirm at monday and let you guys updated.
Hi,
I’m running into the same problem with AMD graphics card.
Any updates for that?