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

228
Visualizações
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 à 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