Lots of people have them. I like mine. Check it out.
How I did this:
- Installed PostgreSQL and PostGIS
- Tried to load data from the City of Chicago Maps SHP file.
- Discovered the City uses a weird, us-ft based projection. Installed proj4 to reproject data.
- Reinstalled postgis to get proj4 support.
- Realized that doing reprojection inline was crazy, and I couldn’t figure out the right incantation anyway. Installed gdal, which includes a tool called ogr2ogr.
- Recreated my map database schema with ogr2ogr with the following incantation:
ogr2ogr -f PostgreSQL -t_srs EPSG:4326 PG:dbname=maps srcdir. Explanation: -f PostgreSQL specifies output format; -t_srs EPSG:4326 says to translate coordinates from the input spec (which it can read from the .PRJ file) to the standard EPSG mapping #4326 which is mercator lat/long; srcdir contains the unzipped SHP/PRJ/DBF files.
Note that this does not query the database in realtime, once the page is loaded everything is client side. The database is only used for semi-permanent storage of custom markers like zoomlevel and as a reasonably easy way of accessing the data (I’m better with postgres data APIs than I am with csv or parsing shpfiles or whatever).