Polygon Map Bug (short geom)
Error: Error: Invalid LatLng object: (NaN, NaN) Source File: http://openatlas.local/js/leaflet/mapbox.js
Looking into it I noticed an entry in gis.polygon with a very short geom:
INSERT INTO polygon (id, entity_id, name, description, type, created, modified, geom) VALUES (29, 1185, 'Fair of Prilep', 'This is approximately the area of the Fair of Prilep (Babić 1969)', 'area', '2016-12-01 16:55:06.621672', NULL, '0103000020E610000000000000');
After deleting the entry the map worked fine again but this is just a quick fix and no permanent solution.
The entry seemed to be edited by David Schmidt shortly before the bug occurred so maybe he can give some input what happened.
Besides fixing the bug itself the map script should handle bad data more gracefully, otherwise gis data could be deleted accidentally if the map script isn't working while places are being edited.
Updated by Alexander Watzinger almost 4 years ago
- Status changed from Assigned to In Progress
- Assignee changed from Stefan Eichert to Bernhard Koschicek
Stefan provided a fix for the map polygon bug. I already tested it and it seems to work. Since it should also be tested where it occured (DPP) I suggest following workflow:
Please download the attached file "shapedraw.js" and replace it with the existing "public/js/leaflet/shapedraw.js". After testing polygons locally (especially updating complex ones) upload it on the DPP server, too.
Please also test after Bernhard uploaded the fix.
When all is good, reassign ticket to me and I will merge the fix in the next version.