Project

General

Profile

Actions

Bug #763

closed

Polygon Map Bug (short geom)

Added by Alexander Watzinger over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Category:
Maps
Target version:
Start date:
2016-12-07
Estimated time:
Found in version:

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

shapedraw.js (24.6 KB) shapedraw.js Fixed version from Stefan Alexander Watzinger, 2017-02-14 20:16
Actions #1

Updated by Alexander Watzinger over 7 years ago

  • Status changed from Acknowledged to Assigned
  • Assignee set to Stefan Eichert
Actions #2

Updated by Alexander Watzinger over 7 years ago

  • Status changed from Assigned to Acknowledged
  • Assignee deleted (Stefan Eichert)
Actions #3

Updated by Alexander Watzinger over 7 years ago

  • Assignee set to Stefan Eichert
Actions #4

Updated by Alexander Watzinger about 7 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
Actions #6

Updated by Alexander Watzinger about 7 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.

Actions #7

Updated by Alexander Watzinger about 7 years ago

  • Target version changed from 119 to 2.4.0
Actions #8

Updated by Alexander Watzinger about 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
Actions

Also available in: Atom PDF