moving map rendering to setTarget when map tab is clicked