#20415 closed Bug (fixed)
broken SRID in gis.admin javascript when "USE_THOUSAND_SEPARATOR = True"
Reported by: | Owned by: | Tim Graham | |
---|---|---|---|
Component: | GIS | Version: | 1.8 |
Severity: | Normal | Keywords: | gis, admin, srid |
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
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 (10)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → new |
Version: | 1.5 → 1.8 |
Hi,
I get this bug again (tested in 1.8.5 and 1.8.8).
As soon as I add USE_THOUSAND_SEPARATOR = True
in settings.py, the default map widgets in the admin stop working, as I get this javascript error :
`Uncaught SyntaxError: Unexpected token ,` `(index):151`
The javascript indeed looks like :
var options = { ... map_srid: 4,326, ... };
comment:4 by , 9 years ago
Has patch: | unset |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Bug |
comment:6 by , 9 years ago
Hi, yes this seems to fix it ! Many thanks !
Question : will the fix be backported to 1.8 ?
comment:7 by , 9 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Even simpler:
{{ srid|unlocalize }}