Skip to main content

Street View

Install

By passing the prop streetViewData to the Map Render component:

import { MapRender } from "@matchplat/crono";

<MapRender
streetViewData={{ activateControls: true, coordinates: { lng: 0, lat: 0 } }}
/>;

you will activate the control needed to show street view to the User.

Crono Spinner

The custom map control that allows access to street view (set below the other controls) will show a street view panorama instead of the current map, based on the coordinates passed to the component as a prop.

Crono Spinner

The interface will provide a google map control to go back to the standard map and customized zoom controls.

Style

warning

Check height and width of the parent

Google's API by default needs a height and a width for the component hosting its maps.
Crono sets a value of 100% to both properties, but if the parent has no values defined, the map will not be printed to the screen.

import { MapRender } from "@matchplat/crono";

<MapRender
streetViewData={{
activateControls: true,
coordinates: { lng: 0, lat: 0 },
height: "500px",
width: "500px",
}}
/>;