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

331
Visualizações
Change leaflet map opacity outside circle of point

Geoapify search nearby places feature highlights the area that is located within the given result , i need to know how to add this feature to leaflet map so the given radius area containing nearby places is highlighted from another areas ,is there any solution to do this in react leaflet map ?

enter image description here

 useEffect(() => {
         const map = useMap();
         L.circle([lat, lng], { radius: 200 }).addTo(map);
      }, []);

    const Map = () => {
      return (
        <MapContainer 
          center={center} 
          minZoom={1} 
          zoomControl={false}
        >
          <TileLayer
            attribution='&copy; <a href="http://osm.org/copyright"></a> contributors'
            url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
          /> 
          
        </MapContainer>
      );
    };         
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

A way would be to use L.Donut and draw a circle with hole around the marker:

L.marker(map.getCenter()).addTo(map);
var donut = L.donut(map.getCenter(),{
    radius: 20000000000000,
    innerRadius: 100,
    innerRadiusAsPercent: false,
    color: '#000',
    weight: 2,
}).addTo(map);

https://plnkr.co/edit/JX3VdzxnGXGoOerr

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