support for selenium tests and new API for map legends