I am looking at the sandcastle picking page and I see the functionality that I want to implement, but I don’t know how to do the equivalent of “Sandcastle.addToolbarButton”. I am not using the native Bing imagery, so there is a custom layer being loaded in the background that is able to be selected. That selection results in outputting garbage values. If I can disable the click on this layer, that would also be a good solution.
Hello,
What kind of imagery provider are you using? For WebMapServiceImageryProvider, you can use the option enablePickFeatures: false to disable picking. I believe there is a similar option for other imagery providers that allow picking.
Best,
Hannah
Here’s the code that I am using:
var imageryLayers = viewer.imageryLayers;
imageryLayers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({
url: ‘its a secret’,
layers: ‘<%=GetRadioResult()%>’,
format: ‘image/jpeg’,
enablePickFeatures: ‘false’
}));
``
I just tested the following values for the enablePickFeatures option: false, true, False, True, FALSE, TRUE. All of which resulted in the same thing(picture attached). I also removed that option from the declaration, and it had no effect. Am I doing something wrong? Syntax, spelling?
Thanks for all of your help!
Brandon
Instead of enablePickFeatures: ‘false’, have you tried enablePickFeatures: false ?
‘false’ is a string, and when JavaScript interprets it as a Boolean, it will equal true.
If setting the value to the boolean false doesn’t work, let me know and I’ll take a closer look into what might be going on.
Best,
Hannah
AHH!! It worked!! Thanks a ton!!