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

221
Vistas
Why don't heatmap colors appear on the map?

I want to ask i.e. Why is the heatmap color not showing on the map? and I use from API and GeoJSON is there anything wrong with my own coding? Is there any part of const position = response.features? Link 1 and Link 2

The following example does not show the heatmap color but it comes out like a box and it says marker. enter image description here

useEffect(() => {
            setIsLoading(true);
            getLocation(body)
                .then((response) => {
                    const array = [];
                    response.features.forEach((element) => {
                        array.push({
                            type: "Feature",
                            properties: element["attributes"],
                            geometry: {
                                type: "Point",
                                coordinates: [
                                    element["geometry"]["x"],
                                    element["geometry"]["y"],
                                ],
                            },
                        });
                    });

                    const FeatureCollection = {
                        type: "FeatureCollection",
                        features: array,
                    };
                    if (geoJsonLayer.current) {
                        geoJsonLayer.current.clearLayers().addData(FeatureCollection);
                    }

                    const position = response.features
                        ? response.features.forEach((element) => {
                            return [element["geometry"]["x"], element["geometry"]["y"]];
                        })
                        : [];

                    if (geoJsonLayer.current) {
                        L.heatLayer(position).addTo(FeatureCollection);
                    }

                    setData(FeatureCollection);


                })
                .catch((err) => console.log(err))
                .finally(() => setIsLoading(false));
        };

        fetchData();
    }, [bounds, setIsLoading, tokenArcgis]);
about 4 years ago · Juan Pablo Isaza
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