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

169
Views
How to give each co-ordinate in GeoJson a different color?

I want each co-ordinate to have its own color as per the altitude, which is the third element of the array.

Solutions I've come up with so far: Manually split the data into multiple features, I know how to add styling at a feature/geometry level.

I am using react-leaflet v2.4.0 . Thanks in advance!

Below is the GeoJson object I have.

{
    type: 'FeatureCollection',
    features: [
        {
            type: 'Feature',
            geometry: {
                type: 'MultiLineString',
                coordinates: [
                    [
                        [86.871974, 27.9047199, 4737.0],
                        [86.8715921, 27.9044794, 4733.0],
                        [86.8715009, 27.9046169, 4734.0],
                        [86.8715062, 27.9048065, 4735.0],
                        [86.8711361, 27.9051479, 4732.0],
                        [86.8706104, 27.9048302, 4728.0],
                        [86.8704494, 27.9049677, 4727.0],
                    ]
                ],
            },
        },
    ]
}
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!