'Return URL for legend or None if it does not exist.
The legend can be either an image (for Geoserver\'s WMS)
or a JSON object for ArcGIS.'

def get_legend_url(self):

    legend = self.get_legend()
    if (legend is None):
        return None
    return legend.url
