Skip to content

Commit

Permalink
errors if user tries to make a torque map -- to be added later
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-esch committed Jun 23, 2017
1 parent a396ffb commit f795078
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cartoframes/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,13 @@ def map(self, layers=None, interactive=True,
if not layer.is_basemap and layer.time]
time_layer = layers[time_layers[0]] if len(time_layers) > 0 else None
if len(time_layers) > 1:
raise ValueError('map can at most take 1 Layer with time column/field')
raise ValueError('Map can at most take 1 Layer with time '
'column/field')
if time_layer:
raise NotImplementedError('Animated maps are not yet supported')
if not interactive:
raise ValueError('map cannot display a static image with a time_column')
raise ValueError('map cannot display a static image with a '
'time_column')
layers.append(layers.pop(time_layers[0]))

# If basemap labels are on front, add labels layer
Expand All @@ -619,7 +622,6 @@ def map(self, layers=None, interactive=True,
nb_layers = non_basemap_layers(layers)
options = {'basemap_url': basemap.url}

# Reverse layers to put torque's Map first
for idx, layer in enumerate(nb_layers):
self._check_query(layer.query,
style_cols=layer.style_cols)
Expand Down

0 comments on commit f795078

Please sign in to comment.