Little google maps web-application to visualize interesting locations near you. Initially created for the neighborhood of the Gotthelf Quartier Basel (Switzerland).
- Local PHP 5 installation (maybe easiest to install through a LAMP bundle)
- Webspace with PHP 5 support and MySQL database access
- Own Google Maps API Key (can be obtained here)
Setup and configuration of the application is a little bit annoying. All this could be done via a script, but I am lacking time and knowledge to write it.
Clone the git repository and follow these steps.
- Start a shell and change-dir into the
web/service
-folder of the neighborhood application (where thecomposer.json
-File is located). - This application uses Composer for dependency management in PHP. On *ix systems, install it using:
curl -sS https://getcomposer.org/installer | php
(See the composer getting started site, if you need more assistance)
- Run composer (using PHP):
php composer.phar install
This step downloads and installs all PHP dependencies that are needed by the neighborhood application.
Create the necessary tables using a MySQL client of your choice (web-hoster often offer a phpmyadmin frontend): execute the SQL statements in the create_tables.sql
file. (Check if a marker
table has been created.)
Configure the application:
Open web/service/service.php
with a text editor and fill in the correct values for DB_NAME
, DB_USER
, DB_PASSWORD
and DB_HOST
.
###Configure the Google Maps API key (Optional)
Open web/index.html
with a text editor and complement the Google maps URL with your API Key for (see Sign Up for the Google Maps API).
###Change map options
Change the map options: center
and zoom
.
###Setup map icons
The icons that are used to display the coordinates on the map have to be saved within the mapicons/
folder.
The name of the icon has to be the same as the icon
-attribute of the marker
records (+ '.png'). At least a icon with the name 'default.png' has to be provided.
Now that you have set-up and configured the application, copy the web
-folder to the webspace of your hoster. Installation complete!