Our web mapping requirements are fairly standard - some basic querying and the ability to print out the resulting map (or save the image). Typically we've used ESRI products in the past (right now we're using GeoCortex) but we still haven't been able to solve the problem of how to parse the legend information to match what is actually being shown on the map. For example, if there are four polygons showing up on the map, there should only be four legend items for the polygons. Is there an open source solution for this problem?
EDIT: Let's see if I can clarify this more. Currently, we have a geology layer with 33,000+ polygons. The legend for this layer is a single image and contains several hundred legend items (ie. it's the legend for the entire geology layer, stored in a JPEG/PNG).
Typically, a user will zoom in on an area (such as a single NTS map sheet, or even smaller) and so a subset of geology polygons will be shown on screen. They will then save the map as a print document (PDF or image), which is generated by GeoCortex/ArcGIS Server. The print document will contain a header, an image of the map and a legend. However, the legend for the geology layer will be the legend for the entire geology layer, not what is actually shown on the map (ie. a much smaller subset).
So, I'm looking to see if there is a FOSS solution to enable me to clip out or generate on the fly an subset of the geology legend which reflects the actual items on-screen/on the map, to go with the print document. I hope that clarifies things; I apologize if it doesn't!