﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23293	OSMapWidget.js error when use GeometryCollectionField	koyoyo	nobody	"On method getControls at line 357, there are only check on line, point and polygon but when use GeometryCollection it didn't check anything so it will error on method enableDrawing at line 350

{{{
this.map.getControlsByClass('OpenLayers.Control.DrawFeature')[0].activate();
}}}

So we must check on method getControls when geom_name is GeometryCollection to enable line, point and polygon like this.


{{{
if (this.options.geom_name.indexOf('GeometryCollection') >= 0) {
        this.controls.push(new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Path, {'displayClass': 'olControlDrawFeaturePath'}));
        this.controls.push(new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Polygon, {'displayClass': 'olControlDrawFeaturePolygon'}));
        this.controls.push(new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Point, {'displayClass': 'olControlDrawFeaturePoint'}));
    }
}}}"	Bug	closed	GIS	1.6	Normal	fixed			Unreviewed	0	0	0	0	0	0
