Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix error with detecting raster layers

  • Loading branch information...
commit 3890f6ca3db99099aa2caf9831d8470df84f641f 1 parent 0260e2e
Toby Collett authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 bindings/python/mapnik/printing.py
View
8 bindings/python/mapnik/printing.py
@@ -858,9 +858,9 @@ def render_legend(self,m, page_break=False, ctx=None, collumns=1,width=None, hei
if ctx is None:
ctx=cairo.Context(self._s)
(tx,ty) = self._get_meta_info_corner((self.map_box.width(),self.map_box.height()),m)
- ctx.translate(tx,ty)
- width = self._pagesize[0]-2*pt2m(tx)
- height = self._pagesize[1]-self._margin-pt2m(ty)
+ ctx.translate(m2pt(tx),m2pt(ty))
+ width = self._pagesize[0]-2*tx
+ height = self._pagesize[1]-self._margin-ty
x=0
y=0
@@ -883,7 +883,7 @@ def render_legend(self,m, page_break=False, ctx=None, collumns=1,width=None, hei
# check through the features to find which combinations of styles are active
# for each unique combination add a legend entry
for f in l.datasource.all_features():
- if f.num_geometries > 0:
+ if f.num_geometries() > 0:
active_rules = []
rule_text = ""
for s in l.styles:
Please sign in to comment.
Something went wrong with that request. Please try again.