openlayers/openlayers — pull request #959 by mucer (2013-04-26 08:19:19+00:00)
Title: New option "featureType" for DrawFeature control

If a GML protocol with multiple feature types renders a feature, the used feature type was an array of all types.
Now it will be checked, whether a given feature has a type. If true it will be used for the generated XML, otherwise the first type of the format is used. Therfore it must be possible to assign a type to the feature, why I added a new "featureType" option to the DrawFeature control.

*See tests\Format\GML\v2.html*
```javascript
var format = new OpenLayers.Format.GML.v2({
featureType: ["LKUNSTWERK", "PKUNSTWERK", "VKUNSTWERK"],
featureNS: "http://mapserver.gis.umn.edu/mapserver",
geometry_name: "geometry"
});

feature.type = 'PKUNSTWERK';
format.write(feature)
```

The string `[LKUNSTWERK, PKUNSTWERK, VKUNSTWERK]` was used as type.