add transition callback to ensure the map size is correct