Skip to content

Commit

Permalink
Merge pull request #167 from CartoDB/add-nonimplemented-error-torque
Browse files Browse the repository at this point in the history
prevents time based maps from being made until they're fully working
  • Loading branch information
andy-esch authored Jun 23, 2017
2 parents 5cf6af1 + f795078 commit 2b5a963
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 2b5a963

Please sign in to comment.