Geomap: legend enhancements

Cache "OpenLayer.Geometry" in a local variable for the case checks since it is used repeatedly in each of the cases.