merge from mapjs
move binding of mapToolbarWidget to before the extensions are loaded