Leaflet JSONP Tests
by spydmobile
HTML
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" crossorigin="" />
<!-- Make sure you put this AFTER Leaflet's CSS -->
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA==" crossorigin=""></script>
<div id="mapid"></div>
CSS
#mapid {
height: 400px;
}
JavaScript
let fireUrl = 'https://www.enr.gov.nt.ca/geoserver/nwtfire/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=nwtfire:firesit_publicPoint&maxFeatures=5000&outputFormat=text/javascript'
fetch(fireUrl)
.then(response => {
console.log("good");
})
.catch(err => {
console.error(`error:${err}`);
});