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

132
Visualizações
How to style google maps cloud-based with terrain maptype?

What I'm trying to do is to switch to cloud-based styling from the local one. And here I'm facing an issue with styling over terrain map type. It used to look like this (and it worked):

<GoogleMap
                key="GoogleMap"
                mapContainerStyle={mapConfig.containerStyle}
                zoom={mapConfig.zoom}
                center={mapConfig.center}
                options={{
                    styles: options,
                    disableDefaultUI: true,
                    fullscreenControl: true,
                    mapTypeId: 'terrain',
                }}
                onClick={closeActiveTooltip}
            >

Now I've moved style to API, and it look like this (not working - terrain is covering the styles, replacing them by it's default):

        <GoogleMap
                key="GoogleMap"
                mapContainerStyle={mapConfig.containerStyle}
                zoom={mapConfig.zoom}
                center={mapConfig.center}
                options={{
                    // styles: options,
                    // disableDefaultUI: true,
                    // fullscreenControl: true,
                    mapId: ['{myId}', 'terrain'],
                    // mapTypeId: 'terrain',
                }}

                onClick={closeActiveTooltip}
            >

Does anybody know, if it's possible to make it work?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

It seems that you will be using cloud-base styling of Maps JavaScript API and would like to implement it in terrain map types. This is currently an intended behavior of the API because cloud-based map styling seems to be not working on map types like terrain and hybrid as posted in the Public Issue Tracker. It also states that this issue is not applicable when using JSON styling(like the first one you are using). You can star the issue on the link to get notifications and updates.

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