Installing
- Copy
config.sample.php
toconfig.inc.php
and edit to reflect your enviroment - Run
composer install
in the root directory of the project - Run
make
in the root directory of the project - Copy
www/sample.htaccess
towww/.htaccess
and edit to reflect your enviroment - Run
php script/rebuildDatabase.php
to set up the database
Creating map tiles:
Using maptiler.org
For Mac OS X 10.6:
From /path/to/workspace/unl_tourmap/map_source or http://code.google.com/p/maptiler/ get and run:
- http://www.kyngchaos.com/files/software/unixport/GDAL_Complete-1.7.dmg (nothing to do after installation)
- http://maptiler.googlecode.com/issues/attachment?aid=1641967504875078876&name=maptiler-1.0-beta2fix3-macosx.zip&token=11bf9597dafa626a65cd4afa3ef5d736
Steps in maptiler program:
- Google Maps Compatible
- "Add" the full map image from /path/to/workspace/unl_tourmap/map_source Set "Georeference" to 40.8420 40.8112 -96.6443 -96.7198 for the UNL 3D map (current coords as of 8/18/10 for map_source/city_east_top_8-2010.png)
- WGS84 - Latitude and Longitude
- Min zoom: 14 max zoom: 18 and
- transparent png (then after creating them see Crushing pngs below)
- JPEG (then after creating them see Editing JPGs below)
- Save in /path/to/workspace/unl_tourmap/www/images/tilesets/unl - dont need a destination url
- Dont need viewers
- Dont worry about details
- Press "Render"
Crushing pngs
Each tile created by MapTiler is roughly 135kb - to minimize file size:
- From map_source or http://pngnq.sourceforge.net/ install pngnq (instuctions in the README)
- Run: cd /path/to/workspace/unl_tourmap/www/images/tilesets/unl find . -name *.png -type f -exec echo "Processing '{}'" ; -exec pngnq -n 256 {} ;
- The pngnq -f option which is supposed to overwrite the existing file doesn't work so we'll rename all the files ourself, removing the "-nq8": find . -name "*-nq8.png" -exec bash -c "mv $1 `echo $1 | sed s/-nq8.png/.png/`" -- {} ;
Editing JPGs
This will remove edge tiles that have large blocks of white
- Run: cd /path/to/workspace/unl_tourmap/www/images/tilesets/unl
- Run: find . -name *.jpg -type f -exec php ../../../../map_source/process_jpgs.php {} ;
Compressing JPGs
(Quality can be adjusted by opening the script file specified below and changing the number by the comment "set quality to suit")
- In Photoshop CS5: File->Scripts->Browse...
- Select /path/to/workspace/unl_tourmap/map_source/photoshop_jpg_compress_script.jsx
- Select /path/to/workspace/unl_tourmap/www/images/tilesets/unl
Updating Map Features:
Updating Lat/Long for Buildings
- Sourced from UNL_Geography_SpatialData_Campus project
Updating Buildings List/Codes
- Replace the /data/all_buildings.csv file obtained from FMP (Currently adjustments are made by UCOMM in additional_buildings.csv to compensate for things like SELQ, MEMS)
- Make sure all values (commas,quotes) are properly escaped in it
- Run /data/csv_to_array.php to replace buildings.inc.php and locations.inc.php
Updating Other Features
- Features such as Emergency Phones, Police Stations, etc are in /data as georss xml files