mistercrunch commented on a change in pull request #4068: [geo] Add Deckgl 
GeoJson layer
URL: 
https://github.com/apache/incubator-superset/pull/4068#discussion_r157375825
 
 

 ##########
 File path: superset/assets/visualizations/deckgl/geojson.jsx
 ##########
 @@ -0,0 +1,43 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import { GeoJsonLayer } from 'deck.gl';
+
+import DeckGLContainer from './DeckGLContainer';
+
+function DeckGeoJsonLayer(slice, payload, setControlValue) {
+  const fd = slice.formData;
+  const c = fd.color_picker;
+  const data = payload.data.geojson.features.map(d => ({
+      ...d,
+      properties: {
+        fillColor: [c.r, c.g, c.b, 255 * c.a],
 
 Review comment:
   The GeoJSON may have its own colors defined, if that's the case the user may 
or may not want to override it. I feel like we'll need an intricate "GeoJSON 
properties" control where the user could decide to override or not properties 
like fillColor, strokeColor, strokeWidth, ...
   
   https://github.com/uber/deck.gl/blob/master/docs/layers/geojson-layer.md

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to