Minor draw-features cleanup
This commit is contained in:
@@ -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 </label>
|
<label>Geometry type </label>
|
||||||
<select id="type">
|
<select id="type">
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user