You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git clone https://github.com/OpenICGC/extended-apiterritorial-gl-js-viewer.git
cd /extended-apiterritorial-gl-js-viewer
npm install
npm run dev - //development
npm run build - //build 4 production
API Connection (main.js)
letservice="all";//you can choose specific services (comma separated)map.on("click",function(e){letlon=e.lngLat.lng;letlat=e.lngLat.lat;apiConnect(lat,lon,service);});asyncfunctionapiConnect(lat,lon,service){constresponse=awaitfetch(`https://api.icgc.cat/territori/${service}/geo/${lon}/${lat}`);constdades=awaitresponse.json();//Do anything with dades (geojson)}