Commit 518b7df5 authored by irving's avatar irving

Añadido que se pueda copiar el poligono en la vista de minimapa modal

parent 6008f1d4
......@@ -80,6 +80,9 @@ function showMyModalSetTitle(name, data) {
$('#myModalTitle').append(name);
$("#mapmodal").modal();
//console.log(data)
document.getElementById("polygonText").value = data;
setTimeout(function () {
createmap(data);
......@@ -88,6 +91,14 @@ function showMyModalSetTitle(name, data) {
}
function copyPolygonText(){
const textarea = document.getElementById("polygonText");
textarea.select();
document.execCommand('copy');
//console.log("copy")
}
function createmap(data) {
/*var map = new ol.Map({
......
......@@ -310,7 +310,15 @@
<div id="map" class="map"></div>
</div>
<div class="modal-footer">
<div align = "left">
<textarea id ="polygonText" readonly rows="5" style="width: 61em; resize:none; font-size: 7pt;">
POLYGON
</textarea>
</div>
<button style="float: left; type="button" class="btn btn-default" onclick="copyPolygonText()">Copy polygon</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
......
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