map-widget small refactoring