We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://jam.dev/c/12719566-6628-4a3c-ae0e-6aabceae2552
I have a component that controls the visibility of 2 components:
const Controller = ()=>{ // some states // Switch component that changes the showViews state {showViews ? ( <div className='flex flex-1 h-full gap-4 overflow-hidden z-50'> <div className='flex-1 h-full w-full'> <GoogleStreetView viewMode='street' /> </div> <div className='flex-1 h-full w-full'> <ImmersiveView viewMode='immersive' /> </div> </div> ) : null} }
The GoogleStreetView component is implemented like this:
GoogleStreetView
import { defaultLocation } from "@/features/viewer/components" import { cn } from "@/lib/utils" import { GoogleMap, StreetViewPanorama } from "@react-google-maps/api" import { parseAsFloat, useQueryState } from "nuqs" import { ViewProps } from "./google-view-card" export const GoogleStreetView = ({ viewMode, options }: ViewProps) => { const [lng] = useQueryState("lng", parseAsFloat.withDefault(defaultLocation[0])) const [lat] = useQueryState("lat", parseAsFloat.withDefault(defaultLocation[1])) return ( <GoogleMap mapContainerClassName={cn("flex-1 w-full h-full rounded-2xl", viewMode === "split" ? "min-h-0" : "min-h-[680px]")} center={{ lat, lng }} options={{ ...options, tilt: 0, mapTypeId: "roadmap", zoom: 10, fullscreenControl: viewMode !== "split", zoomControl: viewMode !== "split", cameraControl: true, }} > <StreetViewPanorama options={{ addressControl: false, fullscreenControl: viewMode !== "split", zoomControl: viewMode !== "split", position: { lat, lng }, visible: true, motionTracking: false, motionTrackingControl: false, }} /> </GoogleMap> ) }
As you have seen in the shared demo, this component introduces the issue:
<StreetViewPanorama options={{ addressControl: false, fullscreenControl: viewMode !== "split", zoomControl: viewMode !== "split", position: { lat, lng }, visible: true, motionTracking: false, motionTrackingControl: false, }} />
When I remove it , the issue disappear:
import { defaultLocation } from "@/features/viewer/components" import { cn } from "@/lib/utils" import { GoogleMap, StreetViewPanorama } from "@react-google-maps/api" import { parseAsFloat, useQueryState } from "nuqs" import { ViewProps } from "./google-view-card" export const GoogleStreetView = ({ viewMode, options }: ViewProps) => { const [lng] = useQueryState("lng", parseAsFloat.withDefault(defaultLocation[0])) const [lat] = useQueryState("lat", parseAsFloat.withDefault(defaultLocation[1])) return ( <GoogleMap mapContainerClassName={cn("flex-1 w-full h-full rounded-2xl", viewMode === "split" ? "min-h-0" : "min-h-[680px]")} center={{ lat, lng }} options={{ ...options, tilt: 0, mapTypeId: "roadmap", zoom: 10, fullscreenControl: viewMode !== "split", zoomControl: viewMode !== "split", cameraControl: true, }} > {/* <StreetViewPanorama options={{ addressControl: false, fullscreenControl: viewMode !== "split", zoomControl: viewMode !== "split", position: { lat, lng }, visible: true, motionTracking: false, motionTrackingControl: false, }} /> */} </GoogleMap> ) }
Here the demo:
https://jam.dev/c/a7d6aa70-36f3-4ea7-84bb-0409f934777a
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Reproduction Steps
https://jam.dev/c/12719566-6628-4a3c-ae0e-6aabceae2552
I have a component that controls the visibility of 2 components:
The
GoogleStreetView
component is implemented like this:As you have seen in the shared demo, this component introduces the issue:
When I remove it , the issue disappear:
Here the demo:
https://jam.dev/c/a7d6aa70-36f3-4ea7-84bb-0409f934777a
The text was updated successfully, but these errors were encountered: