summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-08-15 10:11:53 +0200
committerClaude Paroz <claude@2xlibre.net>2014-08-15 10:14:55 +0200
commit12adcd505ebe8159cf4644cfa8d393b15ca9d5ea (patch)
treef7c128f58887f8e59e2d6d46560f95dff84c86fb
parent4d2f9c38e835383fe42548353890ed4a302eaa58 (diff)
Complemented 1.6 release notes for 457c16d0d6
And accessorily added missing bits fixing #23293. Forward port of 2cbafd814 from stable/1.7.x
-rw-r--r--django/contrib/gis/static/gis/js/OLMapWidget.js6
-rw-r--r--docs/releases/1.6.6.txt4
2 files changed, 7 insertions, 3 deletions
diff --git a/django/contrib/gis/static/gis/js/OLMapWidget.js b/django/contrib/gis/static/gis/js/OLMapWidget.js
index f3d6be8275..e743310632 100644
--- a/django/contrib/gis/static/gis/js/OLMapWidget.js
+++ b/django/contrib/gis/static/gis/js/OLMapWidget.js
@@ -359,13 +359,13 @@ MapWidget.prototype.getControls = function(layer) {
this.controls = [new OpenLayers.Control.Navigation()];
if (!this.options.modifiable && layer.features.length)
return;
- if (this.options.geom_name.indexOf('LineString') >= 0 || this.options.geom_name == 'Unknown') {
+ if (this.options.geom_name.indexOf('LineString') >= 0 || this.options.geom_name == 'GeometryCollection' || this.options.geom_name == 'Unknown') {
this.controls.push(new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Path, {'displayClass': 'olControlDrawFeaturePath'}));
}
- if (this.options.geom_name.indexOf('Polygon') >= 0 || this.options.geom_name == 'Unknown') {
+ if (this.options.geom_name.indexOf('Polygon') >= 0 || this.options.geom_name == 'GeometryCollection' || this.options.geom_name == 'Unknown') {
this.controls.push(new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Polygon, {'displayClass': 'olControlDrawFeaturePolygon'}));
}
- if (this.options.geom_name.indexOf('Point') >= 0 || this.options.geom_name == 'Unknown') {
+ if (this.options.geom_name.indexOf('Point') >= 0 || this.options.geom_name == 'GeometryCollection' || this.options.geom_name == 'Unknown') {
this.controls.push(new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Point, {'displayClass': 'olControlDrawFeaturePoint'}));
}
if (this.options.modifiable) {
diff --git a/docs/releases/1.6.6.txt b/docs/releases/1.6.6.txt
index 3c1344e173..f3ff77dca0 100644
--- a/docs/releases/1.6.6.txt
+++ b/docs/releases/1.6.6.txt
@@ -36,3 +36,7 @@ Bugfixes
* Prevented ``UnicodeDecodeError`` in ``runserver`` with non-UTF-8 and
non-English locale (`#23265 <https://code.djangoproject.com/ticket/23265>`_).
+
+* Fixed JavaScript errors while editing multi-geometry objects in the OpenLayers
+ widget (`#23137 <https://code.djangoproject.com/ticket/23137>`_,
+ `#23293 <https://code.djangoproject.com/ticket/23293>`_).