Modify your code so that map
will be a google.maps.Map
-object.
When you want to show the streetView of the map( inside the callback of geocoder.geocode()
for example) , you must:
- set the position of the streetview
- set the visibility of the streetview
Example:
map.streetView.setPosition(results[0].geometry.location);
map.streetView.setVisible(true);
Demo: http://jsfiddle.net/doktormolle/7J4G6/
There are more options to control the streetview,( e.g. I would suggest to check if a streetview is available for the given location), but the both lines above are the minimal requirements.