Skip to content

Commit b506231

Browse files
committed
f
1 parent 72d7416 commit b506231

File tree

1 file changed

+7
-32
lines changed

1 file changed

+7
-32
lines changed

src/reload-test/index.html

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
let map;
4949

5050
const url = new URL(location);
51-
const mapType = url.searchParams.get('mapType');
51+
const mapType = 'mapgl'; // url.searchParams.get('mapType');
5252
const mapglUrl = url.searchParams.get('mapglUrl') ?? undefined;
5353

5454
if (mapType === 'mapgl') {
@@ -63,9 +63,12 @@
6363

6464
map = window.map = new mapgl.Map('map', {
6565
center: [37.62708, 55.750471],
66-
key: '4970330e-7f1c-4921-808c-0eb7c4e63001',
67-
// key: 'a1893935-6834-4445-b97a-3405fb426c5b',
68-
zoom: 16,
66+
key: 'a1893935-6834-4445-b97a-3405fb426c5b',
67+
maxPitch: 80,
68+
lowZoomMaxPitch: 80,
69+
pitch: 75,
70+
rotation: 33,
71+
zoom: 17.5,
6972
});
7073
}
7174
reload();
@@ -84,34 +87,6 @@
8487
window.reload = reload;
8588
window.destroy = destroy;
8689
}
87-
88-
if (mapType === 'mapbox') {
89-
function reload () {
90-
if (map) {
91-
map.remove();
92-
}
93-
94-
map = window.map = new mapboxgl.Map({
95-
container: 'map',
96-
style: 'mapbox://styles/mapbox/streets-v9',
97-
zoom: 16,
98-
center: [37.62708, 55.750471]
99-
});
100-
101-
}
102-
103-
reload();
104-
105-
106-
function destroy () {
107-
if (map) {
108-
map.remove();
109-
}
110-
}
111-
112-
window.reload = reload;
113-
window.destroy = destroy;
114-
}
11590
</script>
11691
</body>
11792
</html>

0 commit comments

Comments
 (0)