diff options
| author | Claude Paroz <claude@2xlibre.net> | 2016-06-14 16:18:33 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2016-06-18 10:58:02 +0200 |
| commit | f7a363ee1d2039824d95f35e54219e09c5af67b0 (patch) | |
| tree | d0d159c14a151f933faaa6eb0646679bdb614254 /django/contrib/gis/forms/widgets.py | |
| parent | 7def55c3f6716fcfa40a3bd5d0fbb2090588d81e (diff) | |
Fixed #26753 -- Made GDAL a required dependency for contrib.gis
Thanks Tim Graham for the review.
Diffstat (limited to 'django/contrib/gis/forms/widgets.py')
| -rw-r--r-- | django/contrib/gis/forms/widgets.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/django/contrib/gis/forms/widgets.py b/django/contrib/gis/forms/widgets.py index 01d2f7e53f..efa76a0b2d 100644 --- a/django/contrib/gis/forms/widgets.py +++ b/django/contrib/gis/forms/widgets.py @@ -91,6 +91,7 @@ class OSMWidget(BaseGeometryWidget): template_name = 'gis/openlayers-osm.html' default_lon = 5 default_lat = 47 + map_srid = 3857 class Media: js = ( @@ -104,12 +105,3 @@ class OSMWidget(BaseGeometryWidget): self.attrs[key] = getattr(self, key) if attrs: self.attrs.update(attrs) - - @property - def map_srid(self): - # Use the official spherical mercator projection SRID when GDAL is - # available; otherwise, fallback to 900913. - if gdal.HAS_GDAL: - return 3857 - else: - return 900913 |
