summaryrefslogtreecommitdiff
path: root/htdocs
diff options
context:
space:
mode:
authorMarkus Koch <markus@notsyncing.net>2020-04-25 16:43:55 +0200
committerMarkus Koch <markus@notsyncing.net>2020-04-25 16:43:55 +0200
commitf17bf1ebb0a23206bc37de93dfd49c7b254b6705 (patch)
tree0d465946f2713741241fdf3c8af71df6277d2d9b /htdocs
parent105dc4d3da821219d8d2a01b17833ead0c7c107f (diff)
downloadlifomapserver-f17bf1ebb0a23206bc37de93dfd49c7b254b6705.tar.gz
lifomapserver-f17bf1ebb0a23206bc37de93dfd49c7b254b6705.tar.bz2
lifomapserver-f17bf1ebb0a23206bc37de93dfd49c7b254b6705.zip
Remove necessity for php tile resolution script
The conversion script now generates a proper directory structure with z/y/x coords in the path.
Diffstat (limited to 'htdocs')
-rw-r--r--htdocs/mapscript.js2
-rw-r--r--htdocs/tiles/index.php14
2 files changed, 1 insertions, 15 deletions
diff --git a/htdocs/mapscript.js b/htdocs/mapscript.js
index d83b057..abe85a6 100644
--- a/htdocs/mapscript.js
+++ b/htdocs/mapscript.js
@@ -132,7 +132,7 @@ function load_svg(name, url, active=1) {
}
function load_tiles(name, id) {
- var satellite = L.tileLayer('https://notsyncing.net/maps.linux-forks.de/tiles/?id={id}&z={z}&x={x}&y={y}', {
+ var satellite = L.tileLayer('https://notsyncing.net/maps.linux-forks.de/tiles/{id}/{z}/{y}/{x}.png', {
maxZoom: 14 /*8*/,
maxNativeZoom: 6,
minNativeZoom: 0,
diff --git a/htdocs/tiles/index.php b/htdocs/tiles/index.php
deleted file mode 100644
index 7e0a89b..0000000
--- a/htdocs/tiles/index.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
- $x = intval($_GET['x']);
- $y = intval($_GET['y']);
- $z = intval($_GET['z']);
- $id = preg_replace("/[^a-z0-9\-]/", "", $_GET['id']);
- if (strlen($id) > 30) die();
-
- $hdr = "Location: /maps.linux-forks.de/tiles/$id/$z/" . str_pad($y * (2**$z) + $x, 5, "0", STR_PAD_LEFT) . ".png";
- if (isset($_GET["debug"])) {
- echo $hdr;
- } else {
- header($hdr);
- }
-?>