Compare commits
2 Commits
e0970aacb9
...
2f36f266bf
Author | SHA1 | Date | |
---|---|---|---|
2f36f266bf | |||
11b8c7ede3 |
@ -9,6 +9,10 @@
|
|||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/>
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/>
|
||||||
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js" integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin=""></script>
|
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js" integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin=""></script>
|
||||||
<script src="awesomemarkers/leaflet.awesome-markers.js"></script>
|
<script src="awesomemarkers/leaflet.awesome-markers.js"></script>
|
||||||
|
<!-- Streets -->
|
||||||
|
<script src='https://rawcdn.githack.com/Viglino/Canvas-TextPath/9a757d745071e0eaf2440a1d02117dad38f5b6dd/ctxtextpath.js'></script>
|
||||||
|
<script src='https://rawcdn.githack.com/yakitoritabetai/Leaflet.LabelTextCollision/90fe755cc7ec5d97b71e2e953464fa5369d6e655/dist/L.LabelTextCollision.js'></script>
|
||||||
|
<script src='https://raw.githack.com/triedeti/Leaflet.streetlabels/master/src/Leaflet.streetlabels.js'></script>
|
||||||
</head>
|
</head>
|
||||||
<body style="position: absolute; padding: 0px; margin: 0px; width:100%; height:100%;">
|
<body style="position: absolute; padding: 0px; margin: 0px; width:100%; height:100%;">
|
||||||
<div id="mapid" style="width: 100%; height: 100%;"></div>
|
<div id="mapid" style="width: 100%; height: 100%;"></div>
|
||||||
|
28
scripts/geojson/fetch_streets.sh
Executable file
28
scripts/geojson/fetch_streets.sh
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# WARNING: This script is not yet production ready. The slightest error in the wikipage can throw it off. Handle with care.
|
||||||
|
|
||||||
|
json=`curl 'https://wiki.linux-forks.de/mediawiki/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=Maps:Streets'`
|
||||||
|
data=`echo $json | json_reformat | sed -e 's/\\\\n//g' -n -e 's/.*begin:mapdata\([^}]\+\).*/\1/p' | sed -e "s/|-|/}/g"`
|
||||||
|
|
||||||
|
echo "["
|
||||||
|
export IFS="}"
|
||||||
|
for entry in $data; do
|
||||||
|
name=`echo $entry | sed -n 's/\s*\([^|]\+\).*/\1/p' | sed 's/ $//'`
|
||||||
|
coord=`echo $entry | sed -n 's/.*||\s*\([^|]\+\).*/\1/p'`
|
||||||
|
if [[ "$name" != "" && "$coord" != "" ]]; then
|
||||||
|
echo "{ \"type\": \"Feature\",
|
||||||
|
\"geometry\": {
|
||||||
|
\"type\": \"LineString\",
|
||||||
|
\"coordinates\": [
|
||||||
|
$coord
|
||||||
|
]
|
||||||
|
},
|
||||||
|
\"properties\": {
|
||||||
|
\"name\": \"$name\"
|
||||||
|
}
|
||||||
|
},"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo "{}"
|
||||||
|
echo "]"
|
Loading…
Reference in New Issue
Block a user