Opened 2 years ago

Closed 2 years ago

#20415 closed Uncategorized (fixed)

broken SRID in gis.admin javascript when "USE_THOUSAND_SEPARATOR = True"

Reported by: pierremarc07@… Owned by: nobody
Component: GIS Version: 1.5
Severity: Normal Keywords: gis, admin, srid
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


broken SRID in gis.admin javascript when "USE_THOUSAND_SEPARATOR = True"

geodjango_mpoly.get_ewkt = function(feat){return 'SRID=900 913;' + geodjango_mpoly.wkt_f.write(feat);}

the following change in contrib/gis/templates/gis/admin/openlayers.js fixed the problem

- {{ module }}.get_ewkt = function(feat){return 'SRID={{ srid }};' + {{ module }}.wkt_f.write(feat);}
+ {{ module }}.get_ewkt = function(feat){return 'SRID={% localize off %}{{ srid }}{% endlocalize %};' + {{ module }}.wkt_f.write(feat);}

Change History (2)

comment:1 Changed 2 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

Even simpler: {{ srid|unlocalize }}

comment:2 Changed 2 years ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 0a29057ebea4335d503e373e4526b1c62c15bcdc:

Fixed #20415 -- Ensured srid is not localized in openlayers template

Thanks pierremarc07 at for the report.

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