hughhhh commented on a change in pull request #4173:  Using user-defined 
Javascript to customize geospatial visualization
URL: 
https://github.com/apache/incubator-superset/pull/4173#discussion_r161049473
 
 

 ##########
 File path: superset/viz.py
 ##########
 @@ -1949,22 +1959,22 @@ class DeckPathViz(BaseDeckGLViz):
 
     def query_obj(self):
         d = super(DeckPathViz, self).query_obj()
-        d['groupby'] = []
-        d['metrics'] = []
-        d['columns'] = [self.form_data.get('line_column')]
+        line_col = self.form_data.get('line_column')
+        if d['metrics']:
+            d['groupby'] += [line_col]
+        else:
+            d['columns'] += [line_col]
         return d
 
-    def get_data(self, df):
+    def get_properties(self, d):
         fd = self.form_data
         deser = self.deser_map[fd.get('line_type')]
-        paths = [deser(s) for s in df[fd.get('line_column')]]
+        path = deser(d[fd.get('line_column')])
         if fd.get('reverse_long_lat'):
-            paths = [[(point[1], point[0]) for point in path] for path in 
paths]
-        d = {
-            'mapboxApiKey': config.get('MAPBOX_API_KEY'),
-            'paths': paths,
+            path = (path[1], path[0])
+        return {
+            'path': path,
 
 Review comment:
   nit: 
   set the return to just have `'path': (path[1], path[0])`
   ```
   return {
         'path': (path[1], path[0]),
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to