Opened 8 years ago

Closed 8 years ago

Last modified 8 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 8 years ago.
Screenshot

Download all attachments as: .zip

Change History (13)

by elky, 8 years ago

Screenshot

comment:1 by elky, 8 years ago

Description: modified (diff)

comment:2 by Sergey Fedoseev, 8 years ago

Triage Stage: UnreviewedAccepted

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

comment:3 by Claude Paroz, 8 years ago

Severity: NormalRelease blocker

comment:4 by Claude Paroz, 8 years ago

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 by Claude Paroz, 8 years ago

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

comment:6 by Tim Graham, 8 years ago

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 by Tim Graham, 8 years ago

Patch needs improvement: unset

Tests are passing now.

comment:8 by Claude Paroz, 8 years ago

Triage Stage: AcceptedReady for checkin

comment:9 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In 93eca97:

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

Regression in 2ebfda38e65177dfc7d6e90457ffa4a0fa2796f0 (refs #25004).

comment:10 by Tim Graham <timograham@…>, 8 years ago

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 by Tim Graham <timograham@…>, 8 years ago

In 816c5753:

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

comment:12 by Tim Graham <timograham@…>, 8 years ago

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