[talk-cz] [Talk-cz] oznacovani dlazdic jako dirty
Tom Ka
tomas.kasparek na gmail.com
Středa Květen 22 16:20:19 UTC 2019
Pouzij jiny zdroj dlazdic. Ja treba aktualizuju kazdou hodinu automaticky.
Bye
On Tue, Apr 28, 2015, 18:12 Petr Holub <hopet na ics.muni.cz> wrote:
> Ahoj,
>
> narazil jsem na takovy docela pekny Greasemonkey skriptik, treba
> se to bude nekomu hodit:
> https://gist.github.com/Adrianod/e6b522bf1715a49b68c2
> na Alt klik to pak umi na OSM invalidovat dlazdice.
>
> Protoze jsme narazil na obcasne problemy se synchronizaci jednotlivych
> tile serveru OSM, trochu jsem ho pro sichr osklive hacknul, ze to
> jde po vsech serverech najednou, vizte nize.
>
> Petr
>
>
>
> // ==UserScript==
>
> // @name click n' dirt
> // @namespace https://gist.github.com/Adrianod/e6b522bf1715a49b68c2
> // @description Alt-click to mark tiles as dirty on openstreetmap.org
> // @include http://www.openstreetmap.org/*
> // @include https://www.openstreetmap.org/*
> // @version 1
> // @grant none
> // ==/UserScript==
>
> /*
> $.ajax({\
> url: this.src.text().replace(/.\.tile\.openstreetmap\.org/, "
> a.tile.openstreetmap.org")+"/dirty",\
> context: this\
> });\
> */
>
> var code = '\
> $("#map").on("click", ".leaflet-tile", function(e) {\
> if (e.altKey) {\
> $.ajax({\
> url: this.src.replace(/.\.tile\.openstreetmap\.org/, "
> a.tile.openstreetmap.org")+"/dirty",\
> context: this\
> }).done(function() {\
> $(this).fadeTo("fast", .8);\
> });\
> $.ajax({\
> url: this.src.replace(/.\.tile\.openstreetmap\.org/, "
> b.tile.openstreetmap.org")+"/dirty",\
> context: this\
> }).done(function() {\
> $(this).fadeTo("fast", .6);\
> });\
> $.ajax({\
> url: this.src.replace(/.\.tile\.openstreetmap\.org/, "
> c.tile.openstreetmap.org")+"/dirty",\
> context: this\
> }).done(function() {\
> $(this).fadeTo("fast", .2);\
> });\
> }\
> });';
>
> var script = document.createElement("script");
> script.textContent = code;
> document.body.appendChild(script);
>
>
>
> _______________________________________________
> Talk-cz mailing list
> Talk-cz na openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk-cz
>
------------- další část ---------------
HTML příloha byla odstraněna...
URL: <http://lists.openstreetmap.org/pipermail/talk-cz/attachments/20190522/ffabaa86/attachment-0001.html>
Další informace o konferenci talk-cz