Exemplo n.º 1
0
 def size(self):
     if not self._size:
         legend = self.get_legend(
             LegendQuery(format='image/png', scale=None))
         # TODO image size without as_image?
         self._size = legend.as_image().size
     return self._size
Exemplo n.º 2
0
    def legend(self, request):
        p = request.params
        query = LegendQuery(p.format, p.scale)

        for lyr in self.legend_layers:
            yield lyr.get_legend(query)