Make examples work in Internet Explorer

This commit is contained in:
Andreas Hocevar
2020-02-05 20:11:33 +01:00
parent 97246daf66
commit 65c1575dc9
6 changed files with 13 additions and 10 deletions

View File

@@ -18,6 +18,7 @@ cloak:
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<title>Mapbox Style objects with ol-mapbox-style</title>
<link rel="stylesheet" href="../css/ol.css" type="text/css">
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,String.prototype.startsWith,Object.assign"></script>
<style type="text/css">
html, body, .map {
margin: 0;

View File

@@ -139,7 +139,7 @@
&lt;head&gt;
&lt;title&gt;{{ title }}&lt;/title&gt;
&lt;!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --&gt;
&lt;script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"&gt;&lt;/script&gt;{{#if extraHead.remote}}
&lt;script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL"&gt;&lt;/script&gt;{{#if extraHead.remote}}
{{ indent extraHead.remote spaces=4 }}{{/if}}
&lt;style&gt;
.map {

View File

@@ -6,6 +6,8 @@ docs: >
Example showing vector tiles in EPSG:4326 (styled using `ol-mapbox-style`) loaded from maptiler.com.
**Note**: Make sure to get your own API key at https://www.maptiler.com/cloud/ when using this example. No map will be visible when the API key has expired.
tags: "vector tiles, epsg4326, mapbox style, ol-mapbox-style, maptiler"
resources:
- https://cdn.polyfill.io/v2/polyfill.min.js?features=String.prototype.startsWith,Object.assign"
cloak:
- key: get_your_own_D6rA4zTHduk6KOKTXzGB
value: Get your own API key at https://www.maptiler.com/cloud/

View File

@@ -4,7 +4,7 @@ import VectorTileSource from '../src/ol/source/VectorTile.js';
import TileGrid from '../src/ol/tilegrid/TileGrid.js';
import olms from 'ol-mapbox-style';
import {defaultResolutions} from 'ol-mapbox-style/util.js';
import {defaultResolutions} from 'ol-mapbox-style/dist/util.js';
const key = 'get_your_own_D6rA4zTHduk6KOKTXzGB';

14
package-lock.json generated
View File

@@ -2239,9 +2239,9 @@
"dev": true
},
"@mapbox/mapbox-gl-style-spec": {
"version": "13.9.1",
"resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-style-spec/-/mapbox-gl-style-spec-13.9.1.tgz",
"integrity": "sha512-7sOXtrliGz3LAErjJc0q1MtYGcmgwwE1G/PzoTrhvSQTcexSVz+v88QKZ4lAzvhF36ItxzI/UdFilsssAw6hYQ==",
"version": "13.11.0",
"resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-style-spec/-/mapbox-gl-style-spec-13.11.0.tgz",
"integrity": "sha512-OIMGgdp7+KLvSC0v699sXIo7AmBko7XRhsMLCWkxkFfVo7qyUxVkoDpU+xpfvghPteLYy4d30C9sVSQH8IKFwA==",
"dev": true,
"requires": {
"@mapbox/jsonlint-lines-primitives": "~2.0.2",
@@ -9735,12 +9735,12 @@
"dev": true
},
"ol-mapbox-style": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-5.0.2.tgz",
"integrity": "sha512-uXerYhr1FIs+pVtDgPu2oiAFtBULBIXgKcZo4AorSTXoHDyu0tv+IVmPTU0UoMS44pbJQJS8tvEJVf36mteyng==",
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-6.0.0.tgz",
"integrity": "sha512-ODSaYtLvSentp655RdS/cTlK2zCMuOxz9idDo3hyxh+ARgkYu69fZHomjeEJ49pW16Bv8Am8SZSfBUGT5SOW+w==",
"dev": true,
"requires": {
"@mapbox/mapbox-gl-style-spec": "^13.9.0",
"@mapbox/mapbox-gl-style-spec": "^13.11.0",
"mapbox-to-css-font": "^2.4.0",
"webfont-matcher": "^1.1.0"
}

View File

@@ -81,7 +81,7 @@
"loglevelnext": "^3.0.1",
"marked": "0.8.0",
"mocha": "7.0.1",
"ol-mapbox-style": "^5.0.2",
"ol-mapbox-style": "^6.0.0",
"pixelmatch": "^5.1.0",
"pngjs": "^3.4.0",
"proj4": "2.6.0",