php-osm-static-api icon indicating copy to clipboard operation
php-osm-static-api copied to clipboard

[Feature request] Tiles caching

Open mzeddd opened this issue 10 months ago • 0 comments

Topic starter is asking wrong question under right caption. https://github.com/DantSu/php-osm-static-api/issues/10

The page load is slow because tool has to download tiles once again every time And total time it spends in CURL is almost equal to complete execution time.

Here is small timing data: url: https://tile.openstreetmap.org/9/263/184.png - 0.2480480670929 url: https://tile.openstreetmap.org/9/264/184.png - 0.24392104148865 url: https://tile.openstreetmap.org/9/265/184.png - 0.24472713470459 url: https://tile.openstreetmap.org/9/263/185.png - 0.24587512016296 url: https://tile.openstreetmap.org/9/264/185.png - 0.2441189289093 url: https://tile.openstreetmap.org/9/265/185.png - 0.24409294128418 url: https://tile.openstreetmap.org/9/263/186.png - 0.24702787399292 url: https://tile.openstreetmap.org/9/264/186.png - 0.24497199058533 url: https://tile.openstreetmap.org/9/265/186.png - 0.24390411376953

getImage()-savePNG: 2.3367168903351

So, the right question is: Can you add possibility cache tile files in some user defined directory to speed up generation process expecially if user play with the same area again and again?

Thanks in advance.

mzeddd avatar Apr 18 '25 10:04 mzeddd