Opened 7 years ago

Last modified 11 months ago

#11634 new Bug

OpenLayers default position

Reported by: dalkvist Owned by: nobody
Component: GIS Version: master
Severity: Normal Keywords:
Cc: semente+djangoproject@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no


The openlayers.js templet don't take the display projection setting from the GeoModelAdmin classes in to consideration when applying the default position.

Fore example then the display projection is sett to 4326 (wgs83 standard lon/lat) and the map projection is sett to 900913 (the "google projection").
Then it is reasonable to expect the default position to be in the display projection and not the map projection.

The supplied patch checks to see if the display_projection is sett, if it is then adds a transformation call (from display projection to map projection) when the default position is used, in the openlayers.js

Attachments (1)

openlayers.diff (1.4 KB) - added by dalkvist 7 years ago.

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by dalkvist

comment:1 Changed 7 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 years ago by Guilherme Gondim (semente) <semente@…>

  • Cc semente+djangoproject@… added

comment:3 Changed 5 years ago by julien

  • Needs tests set
  • Severity set to Normal
  • Type set to Bug

comment:4 Changed 5 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:5 Changed 5 years ago by aaugustin

  • Easy pickings unset

Change Easy pickings from NULL to False.

comment:6 Changed 11 months ago by timgraham

Claude, could you confirm there is value in keeping this ticket open given it hasn't seen activity in 6 years?

comment:7 Changed 11 months ago by claudep

The reporter was right and the issue might still be accurate (we have some similar center conversion code in OLMapWidget.js).

However, I'm not so much interested in fixing this, as I'd like to see openlayer.js disappear. But that would mean deprecating GeoModelAdmin as a whole and I'm not sure we can do this now without loosing some functionalities.

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