Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

358
Views
React Map GL: map not taking the width and height after opening inspect

I am using react map gl to render maps in my react application. But the Maps rendered from react-map-gl are not taking the width after opening inspect and, sometimes not restoring back to normal after shrinking the window

This is my setting for the viewport,

 const mapStyle = {
        height: '100vh',
        width: '60vw',
        zoom: 15
    }

Please find the image below: The left side is reserved for showing extra information

At first, it works as expected

enter image description here

After opening a inspect and closing the sidebar, the map shrinks like this

enter image description here

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

On which react-map-gl version are you? I noticed that in v7 height and width fields in viewState, former viewport, do not exist anymore. Not sure if related.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!