Bug #763
closedPolygon Map Bug (short geom)
Description
On the DPP Server the map wasn't shown anymore and an JavaScript error occurred:
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.
Files
Updated by Alexander Watzinger almost 8 years ago
- Status changed from Acknowledged to Assigned
- Assignee set to Stefan Eichert
Updated by Alexander Watzinger almost 8 years ago
- Status changed from Assigned to Acknowledged
- Assignee deleted (
Stefan Eichert)
Updated by Alexander Watzinger almost 8 years ago
- Assignee set to Stefan Eichert
Updated by Alexander Watzinger almost 8 years ago
- Subject changed from Polygon Map Bug to Polygon Map Bug (short geom)
- Status changed from Acknowledged to Assigned
- Target version set to 119
Updated by Alexander Watzinger almost 8 years ago
- File shapedraw.js shapedraw.js added
Updated by Alexander Watzinger almost 8 years ago
- Status changed from Assigned to In Progress
- Assignee changed from Stefan Eichert to Bernhard Koschiček-Krombholz
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:
@ Bernhard
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.
@ Others
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.
Updated by Alexander Watzinger over 7 years ago
- Target version changed from 119 to 2.4.0
Updated by Alexander Watzinger over 7 years ago
- Status changed from In Progress to Closed
- Assignee changed from Bernhard Koschiček-Krombholz to Alexander Watzinger
- Target version changed from 2.4.0 to 2.3.2