Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

363
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda