How to add a layer without adding it in LayerList widget

3700
2
04-06-2015 10:52 PM
JeremieCornet1
Occasional Contributor II

Hi,

In a widget, i had to add layers without adding it in LayerList widget (and without modifications in jimu.js).

After digging in jimu.js, i finally find how to do this :

After layer's instanciation but before adding it in the map:

myLayer._basemapGalleryLayerType = "basemap";

0 Kudos
2 Replies
StanMcShinsky
Occasional Contributor III

Jeremie,

Could you clarify a little bit? What file and where in the file did you make this change?

-Stan

0 Kudos
JeremieCornet1
Occasional Contributor II

Hi,

To clarify, the aim here is to add layers programmatically without adding it in LayerList widget.

You can use this when programming widgets.

I searched this for one of my widgets and because the solution wasn't easy to find, i share the solution here

0 Kudos