Skip to content

Commit 348d809

Browse files
fix ut
1 parent b5615f9 commit 348d809

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/openlayers/overlay/VectorTileSuperMapRestSpec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
} from '@supermapgis/iclient-common/util/FetchRequest';
55
import { MapService } from '../../../src/openlayers/services/MapService';
66
import Map from 'ol/Map';
7+
import MVT from 'ol/format/MVT';
78
import View from 'ol/View';
89
import VectorTileLayer from 'ol/layer/VectorTile';
910

@@ -120,6 +121,9 @@ describe('openlayers_VectorTileSuperMapRest', () => {
120121
tiles: ['tile/{z}/{y}/{x}.pbf']
121122
})));
122123
}
124+
if (url.indexOf('http://localhost:9876/iserver/services/map-china400/rest/maps/China') > -1) {
125+
return Promise.resolve(new Response(JSON.stringify(mapObject)));
126+
}
123127
return Promise.resolve();
124128
});
125129
new MapService(url).getMapInfo((serviceResult) => {

0 commit comments

Comments
 (0)