Under the Hood of the On-line Map
Jon Warbrick
University of Cambridge Computing Service
This talk was intended to give an overview of how the
University's On-Line Map system works as an example of
a moderately complex web implementation project.
It was priginally presented to the University of Cambridge Web
Liaison Group meeting on 2001-12-14.
Design Issues
- Maps are BIG and don't scale
- Small browser screens/slow links
- Cachability (browsers & shared cache)
- Text as text wherever possible
- To work on all browsers/resolutions
- Bookmarkability
Data Sources
- Map images as EPS files
- Map index as text
- ... the 'usual' problem - both created with only a single use in mind
Initial Image Processing
- In Illustrator:
- Convert colour
- fix fonts
- extract key and scales, remove grid, ...
- In Photoshop:
The Database
- Database needs
- Name (2 forms + sort version)
- Sub-department name
- Address
- Map location (sheet, coordinates, marker type)
- Notes and 'See also' entries
- Cross links
Database Data Sources
- The map index, for University Institutions
- The list on the front of the map, for Colleges
- The street index created by extracting all the text items
from the map drawings and tidying
- All need considerable manual work
- The whole thing stored in CSV
Making the Static Files
- Images
- JPEGs
- Tiles
- Index pages
- Other static pages
The drawmap script
- Written in Perl (~2000 lines)
- Notable features:
- Last-Modified, Conditional-GET, HEAD.
- PNG vs JPEG
- The locations key
- The 'Imagemap problem'
- Using templates
- Uses lots of helper modules:
Text::CSV_XS; Template; Image::Size; HTTP::Date;
Data::Dumper; HTTP::BrowserDetect; GD; HTML::Entities; CGI
- Runs under Apache::Registry
- Marking and the marker CGI
Linking to the Map