mirror of
https://github.com/CIMEngine/map.git
synced 2024-11-22 02:46:22 +03:00
fix: geoURL
This commit is contained in:
parent
52eadc5252
commit
b9d98ff090
1 changed files with 1 additions and 5 deletions
6
index.js
6
index.js
|
@ -94,8 +94,6 @@ window.onload = async () => {
|
||||||
|
|
||||||
let lasticocords;
|
let lasticocords;
|
||||||
|
|
||||||
loginfo("Getting geo data");
|
|
||||||
let geo = await fetch(geoURL);
|
|
||||||
loginfo("Getting country data");
|
loginfo("Getting country data");
|
||||||
let coarray = await fetch(countryInfoUrl);
|
let coarray = await fetch(countryInfoUrl);
|
||||||
coarray = await coarray.json();
|
coarray = await coarray.json();
|
||||||
|
@ -103,11 +101,9 @@ window.onload = async () => {
|
||||||
for (let i = 0; i < coarray.length; i++)
|
for (let i = 0; i < coarray.length; i++)
|
||||||
countries[coarray[i].idc] = coarray[i];
|
countries[coarray[i].idc] = coarray[i];
|
||||||
|
|
||||||
let geojson = await geo.json();
|
|
||||||
|
|
||||||
movc.addSource("map-data", {
|
movc.addSource("map-data", {
|
||||||
type: "geojson",
|
type: "geojson",
|
||||||
data: geojson,
|
data: geoURL,
|
||||||
});
|
});
|
||||||
|
|
||||||
movc.addLayer({
|
movc.addLayer({
|
||||||
|
|
Loading…
Add table
Reference in a new issue