Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

224
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!