Chin
Chin

Reputation: 12712

programmatically close street view

I have a map inside an accordion component. I'd like to return the user to the map's default state each time the map is accessed. This is fine unless the user has gone into street view. In this case I'd like to close it. Is there a programmatic way to do this?

I've looked around the documentation but have come up empty handed.

Upvotes: 2

Views: 1269

Answers (1)

Dr.Molle
Dr.Molle

Reputation: 117354

set the visible-property of the streetViewPanorama to false by calling:

map.getStreetView().setVisible(false)

Upvotes: 11

Related Questions