draw polygon btn

parent 7446daeb
......@@ -151,14 +151,20 @@ sidtMap.prototype.changeInteraction = function() {
features: this.features,
type: "Circle"
});
$("#drawControl").val("Square");
$("#drawControl").children().first().removeClass('fa-vector-square');
$("#drawControl").children().first().addClass('fa-draw-polygon');
} else {
this.interaction = new ol.interaction.Draw({
source:this.vectorLayer.getSource(),
features: this.features,
type: "Polygon"
});
$("#drawControl").val("Polygon");
$("#drawControl").children().first().removeClass('fa-draw-polygon');
$("#drawControl").children().first().addClass('fa-vector-square');
}
this.interaction.on("drawend",function(e){
......
......@@ -248,7 +248,7 @@
<!-- control para dibujar el poligono -->
<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>
<!-- 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