Advertisement
bvdeenen

Spanish Catastro from google maps coords

Dec 6th, 2021
978
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Catastro
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       You
  7. // @match        https://www1.sedecatastro.gob.es/CYCBienInmueble/OVCBusqueda.aspx*
  8. // @icon         https://www.google.com/s2/favicons?domain=gob.es
  9. // @grant        none
  10.  
  11. // ==/UserScript==
  12.  
  13. (function() {
  14.     'use strict';
  15.     $("#tabcoords a").click();
  16.     navigator.clipboard.readText().then( t => {
  17.        let coords = t.split(",").map( f => f.trim() );
  18.        if(coords.length != 2 ) {
  19. console.log("coords is not length 2", coords);
  20.  
  21.        }
  22.         else {
  23.             $("#ctl00_Contenido_txtLatitud").val(coords[0]);
  24.             $("#ctl00_Contenido_txtLongitud").val(coords[1]);
  25.             $("#ctl00_Contenido_btnNuevaCartografia").click();
  26.         }
  27.  
  28.     });
  29. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement