A year or two ago I had looked into doing something like this. There's an open source GIS server out there (forgot the name, but its written in C and runs in its own little world). It was kind of cool, but required a lot of processing power if you wanted a map to come back pretty quickly for just one user. Other times it would just bomb out and crash.
I had found someone in Finland (I think) wrote something in PHP to read in a particular GIS file type and build a map from it. It was meant for Europe because it wasn't handling the lat/long coordinates of North America (in theory, some tweaking would probably make it work).
Basically, I haven't found much out there. Google search and you will find bits and pieces and maybe one of those pieces will do what you need...