Skip to content

Instantly share code, notes, and snippets.

@wboykinm
Created December 18, 2012 19:38
Show Gist options
  • Save wboykinm/4331197 to your computer and use it in GitHub Desktop.
Save wboykinm/4331197 to your computer and use it in GitHub Desktop.
Onclick disable all layers, then enable the clicked layer id
layer.onclick = function(e) {
$.each( arr, function(l){
map.disableLayer(l);
$(this).removeClass('active');
});
map.enableLayer(i);
$(this).addClass('active');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment