Select to view content in your preferred language

On Click Add Imagery layer to the map Dynamically In 4x

403
1
04-01-2024 11:50 PM
naveenbesri
Frequent Contributor

Hi,

my scenario is on click of a button I want to add Imagery layer as basemap dynamically. I tried to add the Imagery layer to my map. its throwing error. Kindly help me out on this.

0 Kudos
1 Reply
Sage_Wall
Esri Regular Contributor

Hi @naveenbesri ,

It's hard to say for certain without a description of the error or seeing how you are adding the basemap.  One way to add a basemap based off a button click would be like so: https://codepen.io/sagewall/pen/ExJbBpr

 

0 Kudos