Allow string to be passed as ol.interaction.Draw type
This commit is contained in:
@@ -54,7 +54,7 @@ var typeSelect = document.getElementById('type');
|
||||
function addInteractions() {
|
||||
draw = new ol.interaction.Draw({
|
||||
source: source,
|
||||
type: /** @type {ol.geom.GeometryType} */ (typeSelect.value)
|
||||
type: typeSelect.value
|
||||
});
|
||||
map.addInteraction(draw);
|
||||
snap = new ol.interaction.Snap({source: source});
|
||||
|
||||
Reference in New Issue
Block a user