From c548dba428d8eed290846235d1aef4c92c0d7b60 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 17 Mar 2017 09:57:42 -0400 Subject: [PATCH] [1.11.x] Fixed #27939 -- Updated OpenLayersWidget.map_srid for OpenLayers 3. Regression in 2ebfda38e65177dfc7d6e90457ffa4a0fa2796f0 (refs #25004). Backport of 93eca976c15dceaf445ab4739bb2f635a2021db0 from master --- django/contrib/gis/forms/widgets.py | 2 +- tests/gis_tests/test_geoforms.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/django/contrib/gis/forms/widgets.py b/django/contrib/gis/forms/widgets.py index e331e1844d..1a03747beb 100644 --- a/django/contrib/gis/forms/widgets.py +++ b/django/contrib/gis/forms/widgets.py @@ -78,6 +78,7 @@ class BaseGeometryWidget(Widget): class OpenLayersWidget(BaseGeometryWidget): template_name = 'gis/openlayers.html' + map_srid = 3857 class Media: css = { @@ -102,7 +103,6 @@ class OSMWidget(OpenLayersWidget): template_name = 'gis/openlayers-osm.html' default_lon = 5 default_lat = 47 - map_srid = 3857 def __init__(self, attrs=None): super(OSMWidget, self).__init__() diff --git a/tests/gis_tests/test_geoforms.py b/tests/gis_tests/test_geoforms.py index 27b80ce9b2..b941e94e42 100644 --- a/tests/gis_tests/test_geoforms.py +++ b/tests/gis_tests/test_geoforms.py @@ -116,7 +116,7 @@ class GeometryFieldTest(SimpleTestCase): # ordering of the rendered dictionary. pt1_serialized = re.search(r'