Abishek Arumugam Abishek Arumugam - 2 years ago 116
Java Question

Using Common Layers access

I am new to javascript. I am using alert option for displaying map layers. if alert option is true it has to display 4 layers. otherwise it has to display 2 layers.

Trying to write optimized code.
Now I am displaying layers as

if(true){1,2,3,4} else{3,4}
. Trying to write optimized code
as common layers.

if true{1,2, + common layers} else{display common layers}
. Somebody

suggest me code example.

Answer Source

You can try this,

  // Layer1, Layer2.
// Layer3,Layer4.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download