Created
December 18, 2012 19:38
-
-
Save wboykinm/4331197 to your computer and use it in GitHub Desktop.
Onclick disable all layers, then enable the clicked layer id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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