Graphics Layer bug

458
2
05-26-2018 05:53 PM
MichaelFrancis
New Contributor

I'm using the JavaScript API, and I've added a bunch of graphics to a graphics layer. I wish to change the opacity of said graphics layer dynamically via a slider on the web page. I move the slider and expect the graphics layer to change, but nothing happens. I logged the graphics layer in my console and can see the opacity value changing, but I can't see the layer change in my view. I even set the fullOpacity property of the view to 0, but my graphics layer doesn't go away, just the basemap. Has anyone come across this before? How did you fix it?

0 Kudos
2 Replies
AdrianWelsh
MVP Honored Contributor

Michael,

Can you post your code?

And is it possible that the layer needs a refresh in order to show the changes (or a map refresh)?

RobertScheitlin__GISP
MVP Emeritus

Michael,

   Are you using 3.x or 4.x of the API. As Adrrian suggests it would help to see some code. Are you using layer.setOpacity(slider.value)?

0 Kudos