Skip to content

Commit a1b92a8

Browse files
committed
【UT】add
1 parent 3f63028 commit a1b92a8

File tree

4 files changed

+739
-443
lines changed

4 files changed

+739
-443
lines changed

src/openlayers/overlay/vectortile/MapboxStyles.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ export class MapboxStyles extends Observable {
247247
_loadStyle(style) {
248248
if (Object.prototype.toString.call(style) == '[object Object]') {
249249
this._mbStyle = style;
250-
this._resolve();
250+
setTimeout(() => {
251+
this._resolve();
252+
}, 0);
251253
} else {
252254
var url = SecurityManager.appendCredential(style);
253255
FetchRequest.get(url, null, { withCredentials: this.withCredentials })

test/openlayers/mapping/InitMapSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('openlayers_InitMap', () => {
3131
});
3232

3333
it('viewOptionsFromMapJSON', () => {
34-
let mapObj = JSON.parse(mapInfo);
34+
let mapObj = JSON.parse(mapInfo_1);
3535
const res = viewOptionsFromMapJSON(mapObj);
3636
expect(res.center).toEqual([mapObj.center.x, mapObj.center.y]);
3737
expect(res.zoom).not.toBeNull();

0 commit comments

Comments
 (0)