bvdeenen icon

Spanish Catastro from google maps coords

bvdeenen | PRO | 12/06/21 02:31:47 PM UTC | 0 ⭐ | 1870 👁️ | Never ⏰ | []
JavaScript |

850 B

|

None

|

0 👍

/

0 👎

// ==UserScript==
// @name         Catastro
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www1.sedecatastro.gob.es/CYCBienInmueble/OVCBusqueda.aspx*
// @icon         https://www.google.com/s2/favicons?domain=gob.es
// @grant        none
 
// ==/UserScript==
 
(function() {
    'use strict';
    $("#tabcoords a").click();
    navigator.clipboard.readText().then( t => {
       let coords = t.split(",").map( f => f.trim() );
       if(coords.length != 2 ) {
console.log("coords is not length 2", coords);
 
       }
        else {
            $("#ctl00_Contenido_txtLatitud").val(coords[0]);
            $("#ctl00_Contenido_txtLongitud").val(coords[1]);
            $("#ctl00_Contenido_btnNuevaCartografia").click();
        }
 
    });
})();

Comments