Hi All
I am adding one arcgis dynamic map service layer on the base map using dojo module in javscript, But it is not loading.
I can't figure out why it is not loading, Please help me on this issue, I am stucked here.
Sadanandachar,
The map dot addLayer method is not wanting an array it is expecting a single layer. So remove the square brackets and it will work fine.
Thank you so much it helped me a lot
I agree, I do the same.
It's easy to get confused between addLayer, which handles just one layer at a time, and addLayers, which expects an array as the input parameter. When I know I will be adding more layers later, I'll go ahead and use addLayers, even if I only have an array with one element in it to start. Then I'm set with the syntax for multiple layers at a later time.
this.map.addLayers([layer1]);
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.