Skip to content

Commit

Permalink
Fix FeatureCollection plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
drnextgis committed Jan 10, 2019
1 parent dd350ff commit f3b0fa8
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions telluric/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,16 @@ def _run_in_tileserver(self, capture):
def _repr_html_(self):
# These imports are here to avoid cyclic references
from telluric.collections import BaseCollection
if isinstance(self, BaseCollection):
if self[0].has_raster:
return self._run_in_tileserver(capture="Feature collection of rasters")
if self.has_raster:
from telluric.features import GeoFeature
if (
isinstance(self, BaseCollection) and
self[0].has_raster
):
return self._run_in_tileserver(capture="Feature collection of rasters")
elif (
isinstance(self, GeoFeature) and
self.has_raster
):
return self._run_in_tileserver(capture="GeoFeature with raster")

warnings.warn(
Expand Down

0 comments on commit f3b0fa8

Please sign in to comment.