Skip to content

Instantly share code, notes, and snippets.

@tmcw tmcw/gist:148496
Created Jul 16, 2009

Embed
What would you like to do?
# 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
You can’t perform that action at this time.