Closed pimvd closed 2 years ago
yeah i need to do something that correctly handles query params
wait I forgot I already added something to fix the query params issue, the check suffix function should correctly handle the fact that you have a ?sv=whatever
I just pushed up a new test to confirm and it should work, what version of this library are you using, and what is your environment, (node, browser?)
Hi Calvin.
Thanks for your quick reply. It was my fault. I was still on version 3.6.3. Just updated to version 4.0.2 and it's fixed.
Thanks for the awesome package.
Pim
Hi,
I've a very strange problem. We used to download a shapefile from our local server. But we are now moved to Azure Blob Storage and it's not working anymore. Looks like shpjs is requesting for files inside the zip, instead of the .zip itself.
So we used to download a file from/shapefile.zip. Was working perfect.
Now we are requesting a file from Azure Blob Storage. Via this code:
shp(shapefile.url).then(geojson => L.geoJSON(geojson))
After the ? is the SAS-token for Azure. And after this shpjs is adding, for example, .shp and .prj. It's not trying to download the .zip at all.
Is there someone who can help?
Edit:
Is it a bug since the url is not ending on .zip but it's ending on the SAS token? https://github.com/calvinmetcalf/shapefile-js/blob/566e2105d33d5a2e5f7409d71dfb95da39856d29/lib/index.js#L153![image](https://user-images.githubusercontent.com/1193635/154083407-8d1e8a54-d320-43ec-95ca-412d2e2913fa.png)