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

322
Visualizações
How do I apply a circular mask on a google Map, so that the window only shows the map within the circle?

I know the Google Maps API allows you to overlay a transparent circle over a map, but I'm wanting the actual map element itself to render within a circle. What would be the cleanest approach you recommend? I don't think the API has this functionality to reshape the window. Would I need to overlay it via CSS? Any help would be greatly appreciated.

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

0

If it is just a circle, simply put the iframe in a circle with overflow:hidden.

.circle-wrapper {
  width: 70vh;
  height: 70vh;
  overflow: hidden;
  border-radius: 50%;
}
.circle-wrapper iframe {
  width: 100%;
  height: 100%;
}

Here's the codepen 👉 https://codepen.io/phucbui/pen/YzrLaJY

about 4 years ago · Juan Pablo Isaza Relatório

0

You could use a mask:

Wrap your google map iframe in a tag and add mask styles to the tag.

<div class="mask-tag"><iframe src=""></iframe></div>

.mask-tag {
    /** use any image you would like */
    mask-image: url(/img/theme/shape-heart.svg);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-image: url(/img/theme/shape-heart.svg);
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}
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