diff --git a/src/components/App.jsx b/src/components/App.jsx index 943879b..da0aef4 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -22,7 +22,7 @@ import SurveyModal from './modals/SurveyModal' import { downloadGlyphsMetadata, downloadSpriteMetadata } from '../libs/metadata' import * as styleSpec from '@mapbox/mapbox-gl-style-spec/style-spec' -import style from '../libs/style.js' +import style from '../libs/style' import { initialStyleUrl, loadStyleUrl } from '../libs/urlopen' import { undoMessages, redoMessages } from '../libs/diffmessage' import { loadDefaultStyle, StyleStore } from '../libs/stylestore' @@ -407,7 +407,7 @@ export default class App extends React.Component { mapRenderer() { const mapProps = { - mapStyle: style.replaceAccessToken(this.state.mapStyle, {allowFallback: true}), + mapStyle: style.replaceAccessTokens(this.state.mapStyle, {allowFallback: true}), options: this.state.mapOptions, onDataChange: (e) => { this.layerWatcher.analyzeMap(e.map) diff --git a/src/components/modals/ExportModal.jsx b/src/components/modals/ExportModal.jsx index 92477c3..f7d997a 100644 --- a/src/components/modals/ExportModal.jsx +++ b/src/components/modals/ExportModal.jsx @@ -10,7 +10,7 @@ import Button from '../Button' import Modal from './Modal' import MdFileDownload from 'react-icons/lib/md/file-download' import TiClipboard from 'react-icons/lib/ti/clipboard' -import style from '../../libs/style.js' +import style from '../../libs/style' import GitHub from 'github-api' import { CopyToClipboard } from 'react-copy-to-clipboard' @@ -235,7 +235,7 @@ class ExportModal extends React.Component { } downloadStyle() { - const tokenStyle = styleSpec.format(stripAccessTokens(style.replaceAccessToken(this.props.mapStyle))); + const tokenStyle = styleSpec.format(stripAccessTokens(style.replaceAccessTokens(this.props.mapStyle))); const blob = new Blob([tokenStyle], {type: "application/json;charset=utf-8"}); saveAs(blob, this.props.mapStyle.id + ".json"); @@ -280,6 +280,12 @@ class ExportModal extends React.Component { onChange={this.changeMetadataProperty.bind(this, "maputnik:mapbox_access_token")} /> + + +