draw polygon btn

parent 7446daeb
...@@ -151,14 +151,20 @@ sidtMap.prototype.changeInteraction = function() { ...@@ -151,14 +151,20 @@ sidtMap.prototype.changeInteraction = function() {
features: this.features, features: this.features,
type: "Circle" type: "Circle"
}); });
$("#drawControl").val("Square"); $("#drawControl").val("Square");
$("#drawControl").children().first().removeClass('fa-vector-square');
$("#drawControl").children().first().addClass('fa-draw-polygon');
} else { } else {
this.interaction = new ol.interaction.Draw({ this.interaction = new ol.interaction.Draw({
source:this.vectorLayer.getSource(), source:this.vectorLayer.getSource(),
features: this.features, features: this.features,
type: "Polygon" type: "Polygon"
}); });
$("#drawControl").val("Polygon"); $("#drawControl").val("Polygon");
$("#drawControl").children().first().removeClass('fa-draw-polygon');
$("#drawControl").children().first().addClass('fa-vector-square');
} }
this.interaction.on("drawend",function(e){ this.interaction.on("drawend",function(e){
......
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
<!-- control para dibujar el poligono --> <!-- control para dibujar el poligono -->
<div id="drawControl" class="drawControl" onclick="osmap.changeInteraction()"> <div id="drawControl" class="drawControl" onclick="osmap.changeInteraction()">
<i class="fas fa-draw-polygon fa-2x iii"></i> <i class="fas fa-vector-square fa-2x iii"></i>
</div> </div>
<!-- control para dibujar el poligono --> <!-- control para dibujar el poligono -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment