Google Maps Street View lets you explore places around the world through360-degree, street-level imagery. You can explore world landmarks, view naturalwonders, navigate a trip, or show the outside of your business.
Google Street View provides panoramic 360-degree views from designated roadsthroughout its coverage area. The coverage available through the SDK is thesame as that for the Google Maps for iOS app or You can read more aboutStreet View and see the supported areas on an interactive map, atAbout Street View.
Each Street View panorama is an image, or set of images, that provides a full360-degree view from a single location. Images conform to the equirectangular(Plate Carre) projection, which contains 360 degrees of horizontal view (afull wrap-around) and 180 degrees of vertical view (from straight up tostraight down). The resulting 360 degree panorama defines a projectionon a sphere with the image wrapped to the two-dimensional surface of thatsphere.
Street View panoramas are viewable with the GMSPanoramaView object. Thisobject provides a viewer that will render the panorama as a sphere, with acamera at its center. You can programmatically control the orientation of thecamera, as well as several properties customizing the viewer.
Both the panoramaID and the coordinate are stored as properties of theGMSPanorama object. You can request a GMSPanorama from theGMSPanoramaService using either the coordinate or panoramaID. Theresulting object will include both pieces of meta-data, as well as an array oflinks to nearby panoramas.
The moveNearCoordinate:source method allows you to specify a source.A source is useful if you want to restrict Street View to only look forpanoramas which are outside. By default, panoramas of locations are eitherinside or outside. Note that outdoor panoramas may not exist for thespecified location.
You can customize the viewer by restricting which gestures are available. Bydefault, panning, zooming and traveling to adjacent panoramas are all enabled.Individual gestures are controlled through properties of GMSPanoramaView.These properties enable or disable user controlled gestures; programmaticchanges are still possible when the gesture is disabled.
Google Street View imagery is viewable from within the Google Maps for iOSapplication. You can launch the Google Maps for iOS application in streetview mode with the comgooglemaps URL Scheme by setting the mapmodeparameter to streetview. An example of a URL that will launch Street Viewappears below. For more information, refer to the URL Schemedocumentation.
The Street View location defines the placement of the camera focus for animage, but it does not define the orientation of the camera for that image.For that purpose, the GMSOrientation object defines two properties:
Once you've created the GMSPanoramaView, and it has either a configured ordefault camera, you can change it in one of several ways. When you change thecamera, you have the option of animating the resulting camera movement. Theanimation interpolates between the current camera attributes and the newcamera attributes.
You can modify the GMSPanoramaCamera object, and set it on theGMSPanoramaView's camera property. This will snap the camera to the newpoint of view with no animation. A GMSCameraPosition may be created to configureany combination of orientation and zoom.
You can animate a transition by calling theanimateToCamera:animationDuration: method of GMSPanoramaView.Additionally, you can control the camera using Core Animation. This is madeavailable through the custom CALayer on GMSPanoramaView,GMSPanoramaLayer.
Markers will scale in size as a function of the distance between the marker'sposition and the GMSCameraView's location. If this distance becomes toogreat, the marker will become too small to display and will be hidden fromview.
You can listen to events that occur on the Street View panorama, such as when auser taps on the panorama. To listen to events, you must implement theGMSPanoramaViewDelegate protocol. See the overallguide to events and the list of methods on theGMSPanoramaViewDelegate.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Google Street View provides panoramic 360 degree views from designated roads throughout its coverage area. Street View's API coverage is the same as that for the Google Maps application ( ). The list of currently supported cities for Street View is available at the Google Maps website.
Although Street View can be used within a standalone DOM element, it is most useful when indicating a location on a map. By default, Street View is enabled on a map, and a Street View Pegman control appears integrated within the navigation (zoom and pan) controls. You may hide this control within the map's MapOptions by setting streetViewControl to false. You may also change the default position of the Street View control by setting the Map's streetViewControlOptions.position property to a new ControlPosition.
The Street View Pegman control allows you to view Street View panoramas directly within the map. When the user clicks and holds the Pegman, the map updates to show blue outlines around Street View-enabled streets, offering a user experience similar to the Google Maps app.
Street View images are supported through use of the StreetViewPanorama object, which provides an API interface to a Street View "viewer." Each map contains a default Street View panorama, which you can retrieve by calling the map's getStreetView() method. When you add a Street View control to the map by setting its streetViewControl option to true, you automatically connect the Pegman control to this default Street View panorama.
You may also create your own StreetViewPanorama object and set the map to use that instead of the default, by setting the map's streetView property explicitly to that constructed object. You may wish to override the default panorama if you want to modify default behavior, such as the automatic sharing of overlays between the map and the panorama. (See Overlays within Street View below.)
You may instead wish to display a StreetViewPanorama within a separate DOM element, often a element. Simply pass the DOM element within the StreetViewPanorama's constructor. For optimum display of images, we recommend a minimum size of 200 pixels by 200 pixels.
The StreetViewPanorama constructor also allows you to set the Street View location and point of view using the StreetViewOptions parameter. You may call setPosition() and setPov() on the object after construction to change its location and POV.
The Street View location defines the placement of the camera focus for an image, but it does not define the orientation of the camera for that image. For that purpose, the StreetViewPov object defines two properties:
On devices that support device orientation events, the API offers users the ability to change the Street View point of view based on the movement of the device. Users can look around by moving their devices. This is called motion tracking or device rotation tracking.
As app developer, you can change the default behavior as follows:
The default StreetViewPanorama object supports the native display of map overlays. Overlays generally appear at "street level" anchored at LatLng positions. (Markers will appear with their tails anchored to the location's horizontal plane within the Street View panorama for example.)
Currently, the types of overlays which are supported on Street View panoramas are limited to Markers, InfoWindows and custom OverlayViews. Overlays which you display on a map may be displayed on a Street View panorama by treating the panorama as a substitute for the Map object, calling setMap() and passing the StreetViewPanorama as an argument instead of a map. Info windows similarly may be opened within a Street View panorama by calling open(), passing the StreetViewPanorama() instead of a map.
Additionally, when creating a map with a default StreetViewPanorama, any markers created on a map are shared automatically with the map's associated Street View panorama, provided that panorama is visible. To retrieve the default Street View panorama, call getStreetView() on the Map object. Note that if you explicitly set the map's streetView property to a StreetViewPanorama of your own construction, you will override the default panorama.
The following example shows markers denoting various locations around Astor Place, New York City. Toggle the display to Street View to show the shared markers displaying within the StreetViewPanorama.
When displaying a StreetViewPanorama, a variety of controls appear on the panorama by default. You can enable or disable these controls by setting their appropriate fields within the StreetViewPanoramaOptions to true or false:
You may wish to programmatically determine the availability of Street View data, or return information about particular panoramas, without requiring direct manipulation of a map/panorama. You may do so using the StreetViewService object, which provides an interface to the data stored in Google's Street View service.