score:3
i've run into a similar issue where when i create my own wrapper for a new mapboxgl map. this issue only shows itself on firefox and safari. this isn't the best solution, but it might be a decent a workaround. add the following to the map component:
this.map.once('load', () => {
this.map.resize()
})
this means that the initial render of the map will look awful. you will want something to mask the loading process. but in absence of a solution that makes it render, properly, the first time, in the virtual dom, it might work out.
Source: stackoverflow.com
Related Query
- Map canvas size MapboxGL JS
- "Error using newLatLngBounds(LatLngBounds, int): Map size can't be zero...." using react-native-maps on Android
- Get size of array returned by map in React render
- marker is showing out of the map in mapboxgl react project
- maximum call stack size exceeded when rendering webcam video to canvas
- react js array map function to render different view on size of array length
- How to make Konva-React responsive (scaling) canvas according to device size / resolution?
- How can I keep the canvas in focus (center) of the camera when the screen size of the browser changes while using Babylonjs?
- Draw canvas and change its size dynamically with react hooks
- React Three.js make objects in scene larger, similar to canvas size
- Three-fiber canvas size
- Changing the size of a Three-Fiber Canvas before downloading it
- How to add tiles nested in leaflet map to canvas with latest version of react-leaflet?
- How do I set both height and width of image so that it can fit the size of my canvas in fabric.js?
- How to size a canvas for jsPDF
- React Native Responsive Font Size
- How to render react components by using map and join?
- "this" is undefined inside map function Reactjs
- How to get a react component's size (height/width) before render?
- react-native - Fit Image in containing View, not the whole screen size
- react-leaflet map not correctly displayed
- How to minimize the size of webpack's bundle?
- Cannot change font size of text field in material ui
- How can I map through an object in ReactJS?
- How target DOM with react useRef in map
- How to have nested loops with map in JSX?
- How to detect if screen size has changed to mobile in React?
- Figuring out how to mock the window size changing for a react component test
- Leaflet: Map container not found
- Scrollable div to stick to bottom, when outer div changes in size
More Query from same tag
- material-ui layout, breakpoints on containers
- React native text going off my screen, refusing to wrap. What to do?
- missing dependencies in react.js project
- Unable to stimulate change event in child component React redux jest
- Change data on navbar when logout and login with another account
- Why isn't useState() hook working as expected?
- React: using refs in a function component
- Issue with Gatsby Netlify Form not receiving Submissions
- Firestore onSnaphot returning duplicate data
- react get all children refs
- React.JS - Can't Seem To Filter Products Array (Always Shows Null)
- How to enrich data from custom react hook
- React Router Error related to Link To
- can't use a member function inside fetch call
- Delay rendering JSX in React
- How to get props at the first rendering
- Remove brackets from JSON array React
- Is there a way to grab the results of a fetch following an onClick event?
- How to get page URL or hostname in NextJs Project?
- ReactJS - Add delay to Link
- Changing opacity of button causes it to be rendered over parent elements
- Thunk won't dispatch from child component
- ReactJS onClick function does not work, TypeError: this is null
- Show the current page after clicking the button with the route in react
- React "map" is undefined/empy while there is a state array?
- React-Typescript edit list
- redux store variable not refreshing inside method
- Uncaught TypeError: data.map is not a function -->react component error
- react.js desktop and mobile web project architecture
- React: how to pass instance to onClick without using an active index