diff options
| author | Danilo Bargen <mail@dbrgn.ch> | 2017-05-14 20:31:17 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-05-14 14:31:17 -0400 |
| commit | a7975260b50282b934c78c8e51846d103636ba04 (patch) | |
| tree | f8845e41155dc7dd37f00367f2fc869da7b58ec4 /django/contrib/gis/forms/widgets.py | |
| parent | d4d812cb567d1f84ef7a569672fdf3c0b83e6fdd (diff) | |
Fixed #28195 -- Added OSMWidget.default_zoom attribute.
Diffstat (limited to 'django/contrib/gis/forms/widgets.py')
| -rw-r--r-- | django/contrib/gis/forms/widgets.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/contrib/gis/forms/widgets.py b/django/contrib/gis/forms/widgets.py index df5cd9b3f0..e48ba96865 100644 --- a/django/contrib/gis/forms/widgets.py +++ b/django/contrib/gis/forms/widgets.py @@ -103,10 +103,11 @@ class OSMWidget(OpenLayersWidget): template_name = 'gis/openlayers-osm.html' default_lon = 5 default_lat = 47 + default_zoom = 12 def __init__(self, attrs=None): super().__init__() - for key in ('default_lon', 'default_lat'): + for key in ('default_lon', 'default_lat', 'default_zoom'): self.attrs[key] = getattr(self, key) if attrs: self.attrs.update(attrs) |
