<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>You might want to read
      <a class="moz-txt-link-freetext" href="https://wiki.openstreetmap.org/wiki/Servers/Tile_CDN">https://wiki.openstreetmap.org/wiki/Servers/Tile_CDN</a> first.</p>
    <p>Simon<br>
    </p>
    <div class="moz-cite-prefix">Am 22.04.2019 um 22:31 schrieb Moritz
      Fromm:<br>
    </div>
    <blockquote type="cite"
      cite="mid:ae30eda0-9489-754a-e3bc-6c6e5a4153cf@moritz-fromm.de">
      <pre class="moz-quote-pre" wrap="">Hi,

I am running an cache proxy for the OSM Tiles server. It's used in
another Project for an Leaflet map and it is considerably faster and
more responsive than the default {a-c}.tile.openstreetmap.org,
absolutely no offense there it's free and just fine overall I guess. I
would really like to use my cache proxy, and if the Server can handle it
offer it to others, on openstreetmap.org. This would both
considerablyincrease a users experience while also reducing the load on
the original tiles server. My plan is to do so using an browser
extension. I have not found uncompressed javascript code for
openstreetmap.org from which to extract the functions to call in order
to change the tiles server, What I have found from decompressing the
assets-<hash>.js is: 

</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">L.OSM.TileLayer = L.TileLayer.extend({
        options: {
            url: <a class="moz-txt-link-rfc2396E" href="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png">"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"</a>,
            attribution: '\xa9 <a
href=<a class="moz-txt-link-rfc2396E" href="https://www.openstreetmap.org/copyright">"https://www.openstreetmap.org/copyright"</a>
target="_blank">OpenStreetMap</a> contributors'
        },
        initialize: function(t) {
            t = L.Util.setOptions(this, t),
L.TileLayer.prototype.initialize.call(this, t.url)
        }
    })
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">I believe this to be where the map is initialized, but executing the
same pice of code with my domain is not working. I am wondering:

 1. was is the least stupid way in order to change the tiles after the
    Page has been loaded?
 2. Is there any better way than writing a plugin for that job?


Greetings,
Moritz


</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dev@openstreetmap.org">dev@openstreetmap.org</a>
<a class="moz-txt-link-freetext" href="https://lists.openstreetmap.org/listinfo/dev">https://lists.openstreetmap.org/listinfo/dev</a>
</pre>
    </blockquote>
  </body>
</html>