Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#27939 closed Bug (fixed)

GeoDjango - map doesn't show correct point in admin

Reported by: elky Owned by: nobody
Component: GIS Version: 1.11
Severity: Release blocker Keywords: gis, geodjango, map, admin
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by elky)

Just upgraded up to 1.11 and there is bug in GIS app - map always displays 0,0 point in admin interface despite my object has correct coords.

Attachments (1)

Screenshot-2017-03-14-at-22.22.17.jpg (73.1 KB) - added by elky 6 years ago.
Screenshot

Download all attachments as: .zip

Change History (13)

Changed 6 years ago by elky

Screenshot

comment:1 Changed 6 years ago by elky

Description: modified (diff)

comment:2 Changed 6 years ago by Sergey Fedoseev

Triage Stage: UnreviewedAccepted

It looks like map widget expects coordinates in the different SRID.

comment:3 Changed 6 years ago by Claude Paroz

Severity: NormalRelease blocker

comment:4 Changed 6 years ago by Claude Paroz

Ah yes, the new base layer from vis.earthdata.nasa.gov is also in the 3857 projection, and not 4326 as the previous one.
Before GDAL was required, we required that the projection of the default base layer was 4326 so that no coordinates conversion were required to display geometries in the default SRID. Now I think we can simply set the OpenLayersWidget.map_srid to 3857 to fix this issue.

comment:5 Changed 6 years ago by Claude Paroz

I don't have a good idea for an appropriate regression test. Any idea welcome!

comment:6 Changed 6 years ago by Tim Graham

Has patch: set
Patch needs improvement: set

PR based on Claude's suggested fix. Some test failures need to be fixed -- perhaps that would be enough for the regression test? I tested manually and it seems to work. To reproduce in the admin, you must use ModelAdmin rather than GeoModelAdmin.

comment:7 Changed 6 years ago by Tim Graham

Patch needs improvement: unset

Tests are passing now.

comment:8 Changed 6 years ago by Claude Paroz

Triage Stage: AcceptedReady for checkin

comment:9 Changed 6 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In 93eca97:

Fixed #27939 -- Updated OpenLayersWidget.map_srid for OpenLayers 3.

Regression in 2ebfda38e65177dfc7d6e90457ffa4a0fa2796f0 (refs #25004).

comment:10 Changed 6 years ago by Tim Graham <timograham@…>

In c548dba4:

[1.11.x] Fixed #27939 -- Updated OpenLayersWidget.map_srid for OpenLayers 3.

Regression in 2ebfda38e65177dfc7d6e90457ffa4a0fa2796f0 (refs #25004).

Backport of 93eca976c15dceaf445ab4739bb2f635a2021db0 from master

comment:11 Changed 6 years ago by Tim Graham <timograham@…>

In 816c5753:

Fixed #27965 -- Fixed precision comparison in a geoforms test (refs #27939).

comment:12 Changed 6 years ago by Tim Graham <timograham@…>

In 4f02adb:

[1.11.x] Fixed #27965 -- Fixed precision comparison in a geoforms test (refs #27939).

Backport of 816c5753ac554b2af710aebc98ad60fd5823e03f from master

Note: See TracTickets for help on using tickets.
Back to Top