drawing button

parent 44a74f0e
......@@ -25,3 +25,8 @@ html, body
background-color: rgba(220,220,220,0.9);
float:right;
}
#div-draw-btn
{
text-align: center;
}
\ No newline at end of file
......@@ -105,12 +105,13 @@ function sidtMap(divID, lng, lat, z)
this.map.on("pointermove",function(e){self.onMousemove(e)});
};
sidtMap.prototype = Object.create( OpenStreetMapsClass.prototype );
//------------------------------------------------------------------------------
sidtMap.prototype.addInteraction = function()
sidtMap.prototype.draw = function ()
{
var self = this;
this.interaction = new ol.interaction.Draw({
source:this.vectorLayer.getSource(),
features: this.features,
......@@ -119,6 +120,7 @@ sidtMap.prototype.addInteraction = function()
this.interaction.on("drawend",function(e){
self.showCoords(e.feature.getGeometry());
self.map.removeInteraction(self.interaction);
});
this.interaction.on("drawstart",function(e){
......@@ -127,6 +129,18 @@ sidtMap.prototype.addInteraction = function()
this.map.addInteraction(this.interaction);
}
sidtMap.prototype.addInteraction = function()
{
var self = this;
this.interactionSelect = new ol.interaction.Select({
condition: ol.events.condition.pointerMove
});
this.map.addInteraction(this.interactionSelect);
}
//------------------------------------------------------------------------------
sidtMap.prototype.onMousemove = function(e)
{
......
......@@ -199,8 +199,7 @@
<li>
<a href="#">
<span>
<i class="fa fa-search"></i>
<button type="submit" name="search" id="search-btn" class="btn btn-primary">Search</button>
<button type="submit" name="search" id="search-btn" class="btn btn-primary"><i class="fa fa-search"></i> Search</button>
<!-- <button name="search" id="search-btn" class="btn btn-primary">Search</button> -->
</span>
</a>
......@@ -212,6 +211,10 @@
</ul>
</form>
</div>
<div id="div-draw-btn">
<button type="submit" name="draw" id="draw-btn" class="btn btn-primary" onclick="osmap.draw()"><i class="fa fa-object-ungroup"></i> Dibujar</button>
</div>
<!-- form-group-->
{% endblock %}
......
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