Created
July 16, 2009 15:59
-
-
Save tmcw/148496 to your computer and use it in GitHub Desktop.
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
# Restrict layer list, if requested | |
if self.layers and self.layers != self.name: | |
layers = self.layers.split(",") | |
for layer_num in range(len(m.layers)-1, -1, -1): | |
l = m.layers[layer_num] | |
if l.name not in layers: | |
del m.layers[layer_num] | |
if self.debug: | |
print >>sys.stderr, "Removed layer %s loaded from %s, not in list: %s" % (l.name, self.mapfile, layers) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment