Merge pull request #14070 from openlayers/dependabot/npm_and_yarn/ol-mapbox-style-9.1.0
Bump ol-mapbox-style from 9.0.0 to 9.1.0
This commit is contained in:
14
package-lock.json
generated
14
package-lock.json
generated
@@ -11,7 +11,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"earcut": "^2.2.3",
|
"earcut": "^2.2.3",
|
||||||
"geotiff": "2.0.4",
|
"geotiff": "2.0.4",
|
||||||
"ol-mapbox-style": "9.0.0",
|
"ol-mapbox-style": "9.1.0",
|
||||||
"pbf": "3.2.1",
|
"pbf": "3.2.1",
|
||||||
"rbush": "^3.0.1"
|
"rbush": "^3.0.1"
|
||||||
},
|
},
|
||||||
@@ -7866,9 +7866,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/ol-mapbox-style": {
|
"node_modules/ol-mapbox-style": {
|
||||||
"version": "9.0.0",
|
"version": "9.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-9.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-9.1.0.tgz",
|
||||||
"integrity": "sha512-smixniNq2N4nTLAYf8ouIcBI4dOd1P6p3CWd/cmuP6ai85s84vOGUVbCa1jcS40oDRlOakWRP3XqtEQhEv7Wbw==",
|
"integrity": "sha512-R/XE6FdviaXNdnSw6ItHSEreMtQU68cwQCGv4Kl8yG0V1dZhnI5JWr8IOphJwffPVxfWTCnJb5aALGSB89MvhA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@mapbox/mapbox-gl-style-spec": "^13.23.1",
|
"@mapbox/mapbox-gl-style-spec": "^13.23.1",
|
||||||
"mapbox-to-css-font": "^2.4.1"
|
"mapbox-to-css-font": "^2.4.1"
|
||||||
@@ -16784,9 +16784,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"ol-mapbox-style": {
|
"ol-mapbox-style": {
|
||||||
"version": "9.0.0",
|
"version": "9.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-9.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-9.1.0.tgz",
|
||||||
"integrity": "sha512-smixniNq2N4nTLAYf8ouIcBI4dOd1P6p3CWd/cmuP6ai85s84vOGUVbCa1jcS40oDRlOakWRP3XqtEQhEv7Wbw==",
|
"integrity": "sha512-R/XE6FdviaXNdnSw6ItHSEreMtQU68cwQCGv4Kl8yG0V1dZhnI5JWr8IOphJwffPVxfWTCnJb5aALGSB89MvhA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@mapbox/mapbox-gl-style-spec": "^13.23.1",
|
"@mapbox/mapbox-gl-style-spec": "^13.23.1",
|
||||||
"mapbox-to-css-font": "^2.4.1"
|
"mapbox-to-css-font": "^2.4.1"
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"earcut": "^2.2.3",
|
"earcut": "^2.2.3",
|
||||||
"geotiff": "2.0.4",
|
"geotiff": "2.0.4",
|
||||||
"ol-mapbox-style": "9.0.0",
|
"ol-mapbox-style": "9.1.0",
|
||||||
"pbf": "3.2.1",
|
"pbf": "3.2.1",
|
||||||
"rbush": "^3.0.1"
|
"rbush": "^3.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
|
import Map from '../../../../../src/ol/Map.js';
|
||||||
import MapboxVectorLayer from '../../../../../src/ol/layer/MapboxVector.js';
|
import MapboxVectorLayer from '../../../../../src/ol/layer/MapboxVector.js';
|
||||||
import {asString} from '../../../../../src/ol/color.js';
|
import View from '../../../../../src/ol/View.js';
|
||||||
import {unByKey} from '../../../../../src/ol/Observable.js';
|
import {unByKey} from '../../../../../src/ol/Observable.js';
|
||||||
|
|
||||||
describe('ol/layer/MapboxVector', () => {
|
describe('ol/layer/MapboxVector', () => {
|
||||||
@@ -90,6 +91,19 @@ describe('ol/layer/MapboxVector', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('background', function () {
|
describe('background', function () {
|
||||||
|
let map;
|
||||||
|
beforeEach(function () {
|
||||||
|
map = new Map({
|
||||||
|
target: createMapDiv(20, 20),
|
||||||
|
view: new View({
|
||||||
|
zoom: 2,
|
||||||
|
center: [0, 0],
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.afterEach(function () {
|
||||||
|
disposeMap(map);
|
||||||
|
});
|
||||||
it('configures the layer with a background function', function (done) {
|
it('configures the layer with a background function', function (done) {
|
||||||
const layer = new MapboxVectorLayer({
|
const layer = new MapboxVectorLayer({
|
||||||
styleUrl:
|
styleUrl:
|
||||||
@@ -116,13 +130,13 @@ describe('ol/layer/MapboxVector', () => {
|
|||||||
})
|
})
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
const source = layer.getSource();
|
map.addLayer(layer);
|
||||||
const key = source.on('change', function () {
|
layer.getSource().once('change', () => {
|
||||||
if (source.getState() === 'ready') {
|
layer.once('prerender', (e) => {
|
||||||
unByKey(key);
|
const pixel = Array.from(e.context.getImageData(0, 0, 1, 1).data);
|
||||||
expect(layer.getBackground()(1)).to.eql(asString([255, 0, 0, 0.8]));
|
expect(pixel).to.eql([255, 0, 0, 0.8 * 255]);
|
||||||
done();
|
done();
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -153,13 +167,13 @@ describe('ol/layer/MapboxVector', () => {
|
|||||||
),
|
),
|
||||||
background: false,
|
background: false,
|
||||||
});
|
});
|
||||||
const source = layer.getSource();
|
map.addLayer(layer);
|
||||||
const key = source.on('change', function () {
|
layer.getSource().once('change', () => {
|
||||||
if (source.getState() === 'ready') {
|
layer.once('prerender', (e) => {
|
||||||
unByKey(key);
|
const pixel = Array.from(e.context.getImageData(0, 0, 1, 1).data);
|
||||||
expect(layer.getBackground()).to.be(false);
|
expect(pixel).to.eql([0, 0, 0, 0]);
|
||||||
done();
|
done();
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -191,13 +205,13 @@ describe('ol/layer/MapboxVector', () => {
|
|||||||
})
|
})
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
const source = layer.getSource();
|
map.addLayer(layer);
|
||||||
const key = source.on('change', function () {
|
layer.getSource().once('change', () => {
|
||||||
if (source.getState() === 'ready') {
|
layer.once('prerender', (e) => {
|
||||||
unByKey(key);
|
const pixel = Array.from(e.context.getImageData(0, 0, 1, 1).data);
|
||||||
expect(layer.getBackground()).to.be(undefined);
|
expect(pixel).to.eql([0, 0, 0, 0]);
|
||||||
done();
|
done();
|
||||||
}
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user