Closed Wintervacht closed 5 years ago
@Wintervacht Can you please make an basic example at codesandbox?
There is no default
props on components to simplify API in our lib.
As I see a source code, there is an options
prop for <StreetViewPanorama />
, which accepts an object with next interface:
the zoom
property is on this object among others.
please reopen if it does not solve your issue
The issue
I have successfully implemented a StreetViewPanorama using the following method in another component's render function: `const StreetViewMap = withScriptjs(withGoogleMap((props) =>
I have tried to change the default zoomlevel but nothing seems to work, am I doing something wrong or is this just not implemented?
My Environment
os: linux react version: 16.6
How does it behave?
No matter whow or where i try to define
zoom
ordefaultZoom
, nothing seems to work, not even when playing around with the documentation.i have tried adding the options
defaultZoom={4} zoom={4}
in the parent GoogleMap component, in the StreetViewpanorama subcomponent and in the eventually called component within the main component'srender
method. Nothing works.How should it behave correctly?
It should render the panorama with a narrower (or wider, depending on zoom level) field of view, to show less or more of the area.
Full disclosure: I'm using the sadly unmaintained React-Google-Maps library, but am willing to change that to this newer version if it solves my problem. I've posted my issue here since this library is basically a newer, rewritten and extended version of that, and this place is more likely to yield an answer than a dead repository.