let map = L.map( 'map', { center: [37.0902, -95.7129], // Default to U.S.A minZoom: 3, zoom: 0 }); L.tileLayer( 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap', subdomains: ['a','b','c'] }).addTo( map ); let markers = L.markerClusterGroup().addTo(map) function drawMap(){ // initialize the map on the "map" div with a given center and zoom var mymap = L.map('mapid').setView([51.505, -0.09], 1); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: '© OpenStreetMap contributors' }).addTo(mymap); fetch(scriptRoot + "api/getCountByGPS") .then(response => { console.log(response) return response.json(); }) .then(data => { for (var i=0; i" + label + "
" + "FastaCount: " +fastaCount); markers.addLayer(marker) }} // Reload the map map.invalidateSize(); document.getElementById("map_view").classList.add("invisible"); document.getElementById("loader").classList.add("invisible"); }