Compare commits
No commits in common. "6a779db77b5983afd955efa6456655c106b8cbaf" and "a4c7833d87a930ac00ca1df361fef02edfad67ac" have entirely different histories.
6a779db77b
...
a4c7833d87
@ -132,7 +132,7 @@ function load_svg(name, url, active=1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function load_tiles(name, id) {
|
function load_tiles(name, id) {
|
||||||
var satellite = L.tileLayer('https://notsyncing.net/maps.linux-forks.de/tiles/{id}/{z}/{y}/{x}.png', {
|
var satellite = L.tileLayer('https://notsyncing.net/maps.linux-forks.de/tiles/?id={id}&z={z}&x={x}&y={y}', {
|
||||||
maxZoom: 14 /*8*/,
|
maxZoom: 14 /*8*/,
|
||||||
maxNativeZoom: 6,
|
maxNativeZoom: 6,
|
||||||
minNativeZoom: 0,
|
minNativeZoom: 0,
|
||||||
|
3
htdocs/tiles/index.php
Normal file
3
htdocs/tiles/index.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
?>
|
@ -41,7 +41,7 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo " Generating tiles..."
|
echo " Generating tiles..."
|
||||||
convert $tempfile -crop ${TILESIZE}x${TILESIZE} +adjoin $out/%d.png
|
convert $tempfile -crop ${TILESIZE}x${TILESIZE} +adjoin $out/%05d.png
|
||||||
|
|
||||||
rm $tempfile
|
rm $tempfile
|
||||||
|
|
||||||
@ -51,16 +51,3 @@ while true; do
|
|||||||
crop=$(($crop * 2))
|
crop=$(($crop * 2))
|
||||||
zoom=$(($zoom + 1))
|
zoom=$(($zoom + 1))
|
||||||
done;
|
done;
|
||||||
|
|
||||||
echo "Renaming files..."
|
|
||||||
for (( z=0; z<=$zoom; z++ )) {
|
|
||||||
echo "Zoom level $z"
|
|
||||||
fac=$((2**$z))
|
|
||||||
for (( y=0; y<$fac; y++ )) {
|
|
||||||
outdir="$MAPNAME/$z/$y"
|
|
||||||
mkdir $outdir
|
|
||||||
for (( x=0; x<$fac; x++ )) {
|
|
||||||
mv $MAPNAME/$z/$(($fac * y + $x)).png $outdir/$x.png
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
json=`curl 'https://wiki.linux-forks.de/mediawiki/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=Maps:Cities'`
|
|
||||||
data=`echo $json | json_reformat | sed -e 's/\\\\n//g' -n -e 's/begin:mapdata\([^}]\+\)/\1/gp' | sed -e "s/|-|/}/g"`
|
|
||||||
|
|
||||||
echo "["
|
|
||||||
export IFS="}"
|
|
||||||
for entry in $data; do
|
|
||||||
name=`echo $entry | sed -n 's/\s*\([^|]\+\).*/\1/p' | sed 's/ $//'`
|
|
||||||
type=`echo $entry | sed -n 's/\s*\([^|]\+\)||\s*\([^|]\+\).*/\2/p' | sed 's/ $//'`
|
|
||||||
coord=`echo $entry | sed -n 's/.*||\s*\([^|]\+\).*/\1/p'`
|
|
||||||
if [[ "$name" != "" && "$coord" != "" ]]; then
|
|
||||||
echo "{ \"type\": \"Feature\",
|
|
||||||
\"geometry\": {
|
|
||||||
\"type\": \"Polygon\",
|
|
||||||
\"coordinates\": [[
|
|
||||||
$coord
|
|
||||||
]]
|
|
||||||
},
|
|
||||||
\"properties\": {
|
|
||||||
\"name\": \"$name\",
|
|
||||||
\"type\": \"$type\"
|
|
||||||
}
|
|
||||||
},"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
export IFS=" "
|
|
||||||
echo "{}"
|
|
||||||
echo "]"
|
|
Loading…
Reference in New Issue
Block a user