<html><body>Ahoj,<br><br>toto mi dříve spolehlivě fungovalo, dnes jsem to zkusil reinkarnovat a bez úspěchu...<br><br>jinými slovy - jak jednoduše označit dlaždici jako dirty?<br><br>vop<br><aside>
---------- Původní e-mail ----------<br>
Od: Petr Holub <hopet@ics.muni.cz><br>
Komu: 'OpenStreetMap Czech Republic' <talk-cz@openstreetmap.org><br>
Datum: 28. 4. 2015 18:13:14<br>
Předmět: [Talk-cz] oznacovani dlazdic jako dirty
</aside><br><blockquote data-email="hopet@ics.muni.cz">Ahoj,<br><br>narazil jsem na takovy docela pekny Greasemonkey skriptik, treba<br>se to bude nekomu hodit:<br>https://gist.github.com/Adrianod/e6b522bf1715a49b68c2<br>na Alt klik to pak umi na OSM invalidovat dlazdice.<br><br>Protoze jsme narazil na obcasne problemy se synchronizaci jednotlivych<br>tile serveru OSM, trochu jsem ho pro sichr osklive hacknul, ze to<br>jde po vsech serverech najednou, vizte nize.<br><br>Petr<br><br><br><br>// ==UserScript==<br><br>// @name        click n' dirt<br>// @namespace   https://gist.github.com/Adrianod/e6b522bf1715a49b68c2<br>// @description Alt-click to mark tiles as dirty on openstreetmap.org<br>// @include     http://www.openstreetmap.org/*<br>// @include     https://www.openstreetmap.org/*<br>// @version     1<br>// @grant       none<br>// ==/UserScript==<br><br>/*<br>        $.ajax({\<br>            url: this.src.text().replace(/.\.tile\.openstreetmap\.org/, "a.tile.openstreetmap.org")+"/dirty",\<br>            context: this\<br>            });\<br>            */<br><br>var code = '\<br>$("#map").on("click", ".leaflet-tile", function(e) {\<br>    if (e.altKey) {\<br>        $.ajax({\<br>            url: this.src.replace(/.\.tile\.openstreetmap\.org/, "a.tile.openstreetmap.org")+"/dirty",\<br>            context: this\<br>            }).done(function() {\<br>                $(this).fadeTo("fast", .8);\<br>        });\<br>        $.ajax({\<br>            url: this.src.replace(/.\.tile\.openstreetmap\.org/, "b.tile.openstreetmap.org")+"/dirty",\<br>            context: this\<br>            }).done(function() {\<br>                $(this).fadeTo("fast", .6);\<br>        });\<br>        $.ajax({\<br>            url: this.src.replace(/.\.tile\.openstreetmap\.org/, "c.tile.openstreetmap.org")+"/dirty",\<br>            context: this\<br>            }).done(function() {\<br>                $(this).fadeTo("fast", .2);\<br>        });\<br>    }\<br>});';<br> <br>var script = document.createElement("script");<br>script.textContent = code;<br>document.body.appendChild(script);<br><br><br><br>_______________________________________________<br>Talk-cz mailing list<br>Talk-cz@openstreetmap.org<br>https://lists.openstreetmap.org/listinfo/talk-cz<br></blockquote></body></html>