layer.load === false when it should be true?

3937
10
Jump to solution
06-26-2015 11:48 AM
LauraMiles1
Frequent Contributor

Hi, I have one secured layer in my map. Every time I run the map from NetBeans, there is a 401 (Unauthorized) error logging in the console for this secured service. Despite this, the layer is visible and useable on the map (identify, query work fine, geometry shows up fine).

I'm not sure what's causing the 401 error - I have myself set up to have access to this service, so that shouldn't be an issue.

For those users who should not have access, I need to gray out the item in the layer menu where they would turn the layer on and off, and deactivate its checkbox. This works fine, and I have it set to do this if layer.loaded === false. Problem is, it always === false, even though it loads and is viewable. Anybody have an idea why this might be?

0 Kudos
10 Replies
DeepakBegrajka1
Emerging Contributor

You can use a chrome plugin to remove CORS error.

http://pointdeveloper.com/how-to-bypass-cors-errors-on-chrome-and-firefox-for-testing/

Just Download the plugin from the link above hope this might help.

0 Kudos