can i set the map size other then using zoomTo()?

Hi all,can i set the map size dynamicall according to some conditions?
coz i want to display the whole route in the map by default once the map is loaded so that the user no need to use zoom to see the whole route.
its something like zoomTo(),is there any other way to set the map size other
then using zoomTo()?
any help is appreciated:)