samedi 15 mai 2021

geotiff can't plotty with leaflet

var map = L.map('mapid').setView([12.613507, 101.929989], 6);
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
        maxZoom: 18,
        attribution: 'Map data © OpenStreetMap contributors, ' +
            'CC-BY-SA, ' +
            'Imagery © Mapbox',
        id: 'mapbox/streets-v11',
        tileSize: 512,
        zoomOffset: -1
    }).addTo(map);

    var MSL = L.leafletGeotiff(
            url='tif/big.tif',
            options={band: 0,
                displayMin: -0.25,
                displayMax: 0.25,
                name: 'MSL',
                colorScale: 'rainbow',
            }
        ).addTo(mymap);
        

I don't know why url='tif/big.tif' is not show on my map pls help ps.This file I just run on my laptop not on server` This is my tif file

Aucun commentaire:

Enregistrer un commentaire