apt install php php-gd php-curl
The following instructions assume that Staticmap is installed at /srv/staticmap/
.
- Clone code to /srv/staticmap/staticmap/
- Create directory /srv/staticmap/cache/maps/
- Grant write permissions to the user running Apache (usually
www-data
) for /srv/staticmap/cache/maps/
Clone Git repository:
cd /srv/
git clone https://github.com/geofabrik/staticmap.git
Add the following lines to your Apache VirtualHost config:
ScriptAlias / /srv/staticmap/staticmap.php/
<Location />
Require all granted
</Location>
Create a directory /srv/staticmap/cache/maps/
and grant write access to this
directory to the user running Apache (www-data
):
mkdir -p /srv/staticmap/cache/maps/
chown -R www-data cache
Further fonts can be installed by placing their .ttf files into the fonts/
subdirectory.
The user running Apache must have read permissions for these files.
Create a copy of config.php.sample
called config.php
and do your configuration there.
Details about the configuration are explained as comments in the file.