You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
Environment details
Specify the API at the beginning of the title (for example, "Places: ...")
import{useDeepCompareEffectForMaps}from"@/hooks/useDeepCompareEffectForMaps";importReactfrom"react";importuseDeepCompareEffectfrom"use-deep-compare-effect";typeMapProps={style: {[key: string]: string};onClick?: (e: google.maps.MapMouseEvent)=>void;onIdle?: (map: google.maps.Map)=>void;}&google.maps.MapOptions&React.PropsWithChildren;constMap=({ onClick, onIdle, children, style, ...options}: MapProps)=>{constref=React.useRef<HTMLDivElement>(null);const[map,setMap]=React.useState<google.maps.Map>();React.useEffect(()=>{if(ref.current&&!map){setMap(newwindow.google.maps.Map(ref.current,options));}},[ref,map]);useDeepCompareEffectForMaps(()=>{if(map){map.setOptions(options);}},[map,options]);React.useEffect(()=>{if(map){["click","idle"].forEach((eventName)=>google.maps.event.clearListeners(map,eventName));if(onClick){map.addListener("click",onClick);}if(onIdle){map.addListener("idle",()=>onIdle(map));}}},[map,onClick,onIdle]);// [END maps_react_map_component_event_hooks]// [START maps_react_map_component_return]return(<><divref={ref}style={style}/>{React.Children.map(children,(child)=>{if(React.isValidElement(child)){// set the map prop on the child component// @ts-ignorereturnReact.cloneElement(child,{ map });}})}</>);};exportdefaultMap;
Stack trace
Uncaught Error: Not initialized. at aZ (webgl.js:182:509) at D8a.wj (webgl.js:965:13) at C8a.wj (webgl.js:551:262) at B8a.m (webgl.js:552:228) at Sla (map.js:18:28) at Rla (map.js:19:203) at Ru (map.js:16:496) at Object.Lj (map.js:62:233) at HTMLDivElement.<anonymous> (common.js:210:701)
Following these steps will guarantee the quickest resolution possible.
Thanks!
The text was updated successfully, but these errors were encountered:
minemos
added
triage me
I really want to be triaged.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
labels
Mar 20, 2023
Thanks for stopping by to let us know something could be better!
PLEASE READ
If you have a support contract with Google, please create an issue in the support console. This will ensure a timely response.
Discover additional support services for the Google Maps Platform, including developer communities, technical guidance, and expert support at the Google Maps Platform support resources page.
If your bug or feature request is not related to this particular library, please visit the Google Maps Platform issue trackers.
Check for answers on StackOverflow with the google-maps tag.
Please be sure to include as much information as possible:
Environment details
Steps to reproduce
Code example
_app.tsx
some_page.tsx
Map.tsx
Stack trace
Following these steps will guarantee the quickest resolution possible.
Thanks!
The text was updated successfully, but these errors were encountered: