Geomap: legend enhancements

I see you are using geomap.mapid all over the place. You should cache the value in a local variable rather than repeatedly retrieving the value from the geomap object. Will help performance.