Allow string to be passed as ol.interaction.Draw type

This commit is contained in:
Frederic Junod
2017-11-21 09:55:52 +01:00
parent ae6ba195f7
commit c0d57ad005
10 changed files with 14 additions and 14 deletions

View File

@@ -179,7 +179,7 @@ function addInteraction() {
var type = (typeSelect.value == 'area' ? 'Polygon' : 'LineString');
draw = new ol.interaction.Draw({
source: source,
type: /** @type {ol.geom.GeometryType} */ (type),
type: type,
style: new ol.style.Style({
fill: new ol.style.Fill({
color: 'rgba(255, 255, 255, 0.2)'