add map legend access function