Merge remote-tracking branch 'upstream/master' into fix/issue-110-update-mapbox-style-spec

Conflicts:
	package.json
This commit is contained in:
orangemug 2017-04-13 08:26:25 +01:00
commit c552838fdd
5 changed files with 18 additions and 5 deletions

View file

@ -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'
}),
})
]
};

View file

@ -30,7 +30,7 @@ module.exports = {
]
},
output: {
path: path.join(__dirname, 'public'),
path: path.join(__dirname, '..', 'public'),
filename: '[name].[chunkhash].js',
chunkFilename: '[chunkhash].js'
},

View file

@ -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",

View file

@ -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
View 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);