mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 08:55:25 +01:00
Merge remote-tracking branch 'upstream/master' into fix/issue-110-update-mapbox-style-spec
Conflicts: package.json
This commit is contained in:
commit
c552838fdd
5 changed files with 18 additions and 5 deletions
|
@ -16,7 +16,7 @@ module.exports = {
|
|||
],
|
||||
devtool: process.env.WEBPACK_DEVTOOL || 'cheap-module-source-map',
|
||||
output: {
|
||||
path: path.join(__dirname, 'public'),
|
||||
path: path.join(__dirname, '..', 'public'),
|
||||
filename: 'bundle.js'
|
||||
},
|
||||
resolve: {
|
||||
|
@ -49,6 +49,6 @@ module.exports = {
|
|||
new HtmlWebpackPlugin({
|
||||
title: 'Maputnik',
|
||||
template: './src/template.html'
|
||||
}),
|
||||
})
|
||||
]
|
||||
};
|
||||
|
|
|
@ -30,7 +30,7 @@ module.exports = {
|
|||
]
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, 'public'),
|
||||
path: path.join(__dirname, '..', 'public'),
|
||||
filename: '[name].[chunkhash].js',
|
||||
chunkFilename: '[chunkhash].js'
|
||||
},
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"homepage": "https://github.com/maputnik/editor#readme",
|
||||
"dependencies": {
|
||||
"@mapbox/mapbox-gl-style-spec": "^9.0.0",
|
||||
"@mapbox/mapbox-gl-rtl-text": "^0.1.0",
|
||||
"classnames": "^2.2.5",
|
||||
"codemirror": "^5.18.2",
|
||||
"color": "^1.0.3",
|
||||
|
@ -103,11 +104,12 @@
|
|||
"babel-preset-es2015": "6.18.0",
|
||||
"babel-preset-react": "6.16.0",
|
||||
"babel-runtime": "^6.11.6",
|
||||
"base64-loader": "^1.0.0",
|
||||
"css-loader": "0.26.1",
|
||||
"eslint": "^3.5.0",
|
||||
"eslint-plugin-react": "^6.2.0",
|
||||
"extract-text-webpack-plugin": "^1.0.1",
|
||||
"file-loader": "0.9.0",
|
||||
"file-loader": "^0.11.1",
|
||||
"html-webpack-plugin": "^2.22.0",
|
||||
"json-loader": "^0.5.4",
|
||||
"karma": "^1.3.0",
|
||||
|
@ -124,7 +126,6 @@
|
|||
"stylelint": "^7.7.1",
|
||||
"stylelint-config-standard": "^15.0.1",
|
||||
"transform-loader": "^0.2.3",
|
||||
"url-loader": "0.5.7",
|
||||
"wdio-mocha-framework": "^0.5.9",
|
||||
"wdio-phantomjs-service": "^0.2.2",
|
||||
"wdio-spec-reporter": "^0.1.0",
|
||||
|
|
|
@ -11,6 +11,7 @@ import Color from 'color'
|
|||
import { colorHighlightedLayer } from '../../libs/highlight'
|
||||
import 'mapbox-gl/dist/mapbox-gl.css'
|
||||
import '../../mapboxgl.css'
|
||||
import '../../libs/mapbox-rtl'
|
||||
|
||||
function renderLayerPopup(features) {
|
||||
var mountNode = document.createElement('div');
|
||||
|
|
11
src/libs/mapbox-rtl.js
Normal file
11
src/libs/mapbox-rtl.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
import MapboxGl from 'mapbox-gl/dist/mapbox-gl.js'
|
||||
|
||||
// Load mapbox-gl-rtl-text using object urls without needing http://localhost for AJAX.
|
||||
const data = require("base64?mimetype=text/javascript!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js");
|
||||
|
||||
const blob = new window.Blob([window.atob(data)]);
|
||||
const objectUrl = window.URL.createObjectURL(blob, {
|
||||
type: "text/javascript"
|
||||
});
|
||||
|
||||
MapboxGl.setRTLTextPlugin(objectUrl);
|
Loading…
Reference in a new issue