Skip to content

Commit

Permalink
fixed polygon bounds mode if no attribute filter is used
Browse files Browse the repository at this point in the history
  • Loading branch information
gka committed Apr 10, 2012
1 parent a693794 commit 8c90e48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kartograph/kartograph.py
Expand Up @@ -175,7 +175,7 @@ def get_bounds_polygons(self, opts):
raise KartographError('layer not found "%s"' % id)
layer = self.layers[id]
attr = data['attribute']
if attr is None:
if not attr:
filter = None
else:
filter = lambda rec: rec[attr] in data['values']
Expand Down Expand Up @@ -219,7 +219,7 @@ def get_features(self, layer, proj, view, opts, view_poly):
filter = None
else:
filter = lambda rec: filter_record(layer['filter'], rec)
features = src.get_features(filter=filter, bbox=bbox)
features = src.get_features(filter=filter, bbox=bbox, verbose=self._verbose)

elif 'special' in layer: # special layers need special treatment
if layer['special'] == "graticule":
Expand Down

0 comments on commit 8c90e48

Please sign in to comment.