draw polygon by imput

parent 2ee2b237
...@@ -81,6 +81,15 @@ function erase_input() { ...@@ -81,6 +81,15 @@ function erase_input() {
$('#ajax-input').val(''); $('#ajax-input').val('');
} }
$("#id_polygon").on('keyup', function (e) {
if (e.keyCode == 13) {
polygon = $('#id_polygon').val();
osmap.removePolygon();
osmap.addWKTPolygon(polygon)
}
});
function erase_product_globe_list() { function erase_product_globe_list() {
var pol_element = document.getElementById('product-list-cart'); var pol_element = document.getElementById('product-list-cart');
while (pol_element.firstChild) { while (pol_element.firstChild) {
......
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