Using user-defined Javascript to customize geospatial visualization (#4173)

* Using JS to customize spatial viz and tooltips

* Add missing deck_multi.png

* Improve GeoJSON layer with JS support and extra controls

* Addressing comments
This commit is contained in:
Maxime Beauchemin
2018-01-11 15:42:44 -08:00
committed by GitHub
parent ee63ebc8ec
commit 87c3e831a8
13 changed files with 237 additions and 54 deletions

View File

@@ -1,6 +1,7 @@
// A safe alternative to JS's eval
import vm from 'vm';
import _ from 'underscore';
import * as colors from './colors';
// Objects exposed here should be treated like a public API
// if `underscore` had backwards incompatible changes in a future release, we'd
@@ -8,6 +9,7 @@ import _ from 'underscore';
const GLOBAL_CONTEXT = {
console,
_,
colors,
};
// Copied/modified from https://github.com/hacksparrow/safe-eval/blob/master/index.js