Skip to content

Commit

Permalink
Merge f17eec4 into eed4e27
Browse files Browse the repository at this point in the history
  • Loading branch information
elenatorro committed Aug 2, 2019
2 parents eed4e27 + f17eec4 commit 31f795c
Show file tree
Hide file tree
Showing 31 changed files with 1,143 additions and 308 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ SITEKEY.txt
test/secret.json
examples/scratch/*

# JavaScript
node_modules

# Tests
.coverage
test_*.json
3 changes: 2 additions & 1 deletion .hound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ flake8:
config_file: .flake8

jshint:
esversion: 6
enabled: true
config_file: .jshintrc
3 changes: 3 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"esversion": 6
}
25 changes: 25 additions & 0 deletions cartoframes/assets/init.js.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
document
.querySelector('as-responsive-content')
.addEventListener('ready', () => {
const show_info = '{{show_info}}' === 'True';
const layers = {{ layers|tojson }};
const bounds = {{ bounds }};
const camera = null;
const mapboxtoken = '{{mapboxtoken}}';
const basemap = '{{basemap}}';
const basecolor = '{{basecolor}}';
const has_legends = '{{has_legends}}' === 'True';
const default_legend = '{{default_legend}}' === 'True';

init({
show_info,
layers,
bounds,
camera,
mapboxtoken,
basemap,
basecolor,
has_legends,
default_legend
});
});
Loading

0 comments on commit 31f795c

Please sign in to comment.