niccokunzmann / mundraub-android

📱Android App for Mundraub, Na-Ovoce and other fruit maps
https://f-droid.org/en/packages/eu.quelltext.mundraub/
GNU General Public License v3.0
33 stars 22 forks source link

static map is not showing up #272

Open niccokunzmann opened 5 years ago

niccokunzmann commented 5 years ago

Currently, the preview image of the map is not available.

Related: #53, #153


We're using Polar.sh so you can upvote and help fund this issue. We receive the funding once the issue is completed & confirmed by you. Thank you in advance for helping prioritize & fund our work.

Fund with Polar

niccokunzmann commented 5 years ago

https://staticmap.openstreetmap.de/staticmap.php?markers=53.029805380987000,13.309555235549700,lightblue1&center=53.029805380987000,13.309555235549700&zoom=18&size=200x200&maptype=outdoors ->

Source code: https://github.com/dfacts/staticmaplite Description: https://wiki.openstreetmap.org/wiki/StaticMapLite

niccokunzmann commented 5 years ago

It is not only not working for some reasons: If a valid request is changed a little, a black picture is returned.


url1='https://staticmap.openstreetmap.de/staticmap.php?markers=52.381373706251900,13.107836237262800,lightblue1&center=52.381373706251900,13.107836237262800&zoom=14&size=200x200&maptype=mapnik'
url2='https://staticmap.openstreetmap.de/staticmap.php?center=40.714728,-73.998672&zoom=14&size=865x512&maptype=mapnik'
url3='https://staticmap.openstreetmap.de/staticmap.php?center=40.714728,-73.998672&zoom=14&size=512x512&maptype=mapnik'
url4='https://staticmap.openstreetmap.de/staticmap.php?center=40.714728,-73.998672&zoom=14&size=865x512&maptype=mapnik'

wget    --header='Host: staticmap.openstreetmap.de' \
    --header='User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0' \
    --header='Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' \
    --header='Accept-Language: en-US,en;q=0.5' \
    --header='Accept-Encoding: gzip, deflate, br' \
    --header='Referer: https://staticmap.openstreetmap.de/' \
    -O map.png \
    "$url3"