Open offtherailz opened 4 years ago
@offtherailz seems to be happening using this specific SHP, other SHPs I tried are working fine.
@tdipisa @offtherailz After rather long investigation the solution seems to be to simply update openlayers to at least version 6.4.0(I've tried 6.3.0, 6.1.0, it still didn't work properly). I've found that there is specifically one problematic feature in the shapefile, that covers antarctica, if we delete it then the rest of the features are displayed correctly. What is interesting I used an online service to convert the shp file and it gave a geojson file that was working fine even with antarctica. (Also I should note that if I import in EPSG:4326 the shapefile is displayed correctly, the problem seems to be only with EPSG:3857, also leaflet doesn't seem to be affected by the problem). Substituting that feature in the geojson that we get from shpjs with the one from geojson I got from the online service solves the problem. There seems to be no significant differences in coordinates (the differences are on the order of 10-14 - 10-15). Very strange. Anyways, updating close to the most recent version of openlayers(the latest is 6.4.3) solves the problem, but it seems to have some changes to it's apis. The changes that I've noticed is that the map no longer zooms out farther then the map(like we can't zoom out so that we get a thin strip in the middle of the screen, the map always occupies the whole window), also zooming with mouse scroll has changed, the amount of the zoom in I get with one scroll became much smaller. I've also had to make a couple of changes to the code to make it compile. Because it seems like a significant change I've decided we should probably first discuss it here.
@vlt1 thank you, we haven't in plan an update of OL for this release. I put this issue in blocked status for now waiting for feedback of other devs like @offtherailz
Yes, it makes sense, a bug related on rendering coordinates out from current projection definition area.
Description
When try to import a shape file, I've an error of "Ops..."
How to reproduce
Expected Result The shape file is imported
Current Result The import fails, the ops window is shown.
Browser info
(use this site: https://www.whatsmybrowser.org/ for non expert users) | Browser Affected | Version | |---|---| |Internet Explorer| | |Edge| | |Chrome| | |Firefox| | |Safari| |Other useful information
error in console