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

389
Vistas
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
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