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

383
Views
how to change band color value in leaflet js
<div>
var mymap = L.map('mapid').setView([20.5937, 78.9629], 5);

        L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
            maxZoom: 18,
            attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
                '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
                'Imagery © <a href="http://mapbox.com">Mapbox</a>',
            id: 'mapbox.streets'
        }).addTo(mymap);

        var fogDepth = plotty.addColorScale("mycolorscale", ["#00ff00", "#0000ff", "#ff0000"], [0, 0.5, 1]);;

        plotty.addColorScale("test", ["#00ff00", "#0000ff", "#ff0000"], [0, 0.5, 1]);


        var fogDepth = L.leafletGeotiff(
            url = 'FOG.tif',
            options = {
                band: 0,
                displayMin: 0,
                displayMax: 45,
                name: 'Fog Depth',
                colorScale: 'rainbow',
                clampLow: false,
                clampHigh: true,
                //vector:true,
                // arrowSize: 20,
            }
        ).addTo(mymap);
</div>

I have added a rainbow color scale to the GeoTIFF file with band=0 min value 0 and max value 45, the tiff file in the grey scale of band =1 how can I change to color scale to rainbow?
with the above code, I am getting this output, and its in scale between 0-1: output image

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!