mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-15 02:43:32 +01:00
Correct style upload
This commit is contained in:
parent
4d70351848
commit
1ad7ece72c
1 changed files with 2 additions and 3 deletions
|
@ -12,7 +12,7 @@ import MdSave from 'react-icons/lib/md/save'
|
||||||
import MdMap from 'react-icons/lib/md/map'
|
import MdMap from 'react-icons/lib/md/map'
|
||||||
|
|
||||||
|
|
||||||
import { GlStyle } from './style.js'
|
import style from './style.js'
|
||||||
import { fullHeight } from './theme.js'
|
import { fullHeight } from './theme.js'
|
||||||
import theme from './theme.js';
|
import theme from './theme.js';
|
||||||
|
|
||||||
|
@ -40,8 +40,7 @@ export class Toolbar extends React.Component {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
reader.readAsText(file, "UTF-8");
|
reader.readAsText(file, "UTF-8");
|
||||||
reader.onload = e => {
|
reader.onload = e => {
|
||||||
const style = JSON.parse(e.target.result);
|
this.props.onStyleUpload(style.fromJSON(JSON.parse(e.target.result)));
|
||||||
this.props.onStyleUpload(GlStyle.fromJSON(style));
|
|
||||||
}
|
}
|
||||||
reader.onerror = e => console.log(e.target);
|
reader.onerror = e => console.log(e.target);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue