Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

329
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda