Minor draw-features cleanup

This commit is contained in:
Frederic Junod
2014-01-22 14:12:32 +01:00
parent 898ad63a8b
commit ff4b85811d
2 changed files with 2 additions and 3 deletions

View File

@@ -31,7 +31,7 @@
<div class="span12"> <div class="span12">
<h4 id="title">Draw features example</h4> <h4 id="title">Draw features example</h4>
<p id="shortdesc">Example of using the Draw interaction.</p> <p id="shortdesc">Example of using the <code>ol.interaction.Draw</code> interaction.</p>
<form class="form-inline"> <form class="form-inline">
<label>Geometry type &nbsp;</label> <label>Geometry type &nbsp;</label>
<select id="type"> <select id="type">

View File

@@ -57,8 +57,7 @@ var draw; // global so we can remove it later
function addInteraction() { function addInteraction() {
draw = new ol.interaction.Draw({ draw = new ol.interaction.Draw({
source: source, source: source,
type: /** @type {ol.geom.GeometryType} */ type: /** @type {ol.geom.GeometryType} */ (typeSelect.value)
(typeSelect.options[typeSelect.selectedIndex].value)
}); });
map.addInteraction(draw); map.addInteraction(draw);
} }