Open-Historical-Map-Labs / openhistoricaltiles

First iteration of vector tiles from OHM Planet data
BSD 2-Clause "Simplified" License
3 stars 0 forks source link

Leaflet readme Documentation out of date #55

Closed jimmyrocks closed 5 years ago

jimmyrocks commented 5 years ago

In the leaflet-control-mbgltimeslider readme (https://github.com/OpenHistoricalMap/openhistoricaltiles/blob/gh-pages/leaflet-control-mbgltimeslider/README.md) the following sample code is provided:

    dateslider = new TimeSlider.TimeSliderControl({
        sourcename: "ohm-data",     // required
        date: 1850,
        datespan: [1800, 2000],
        datelimit: [1600, 2100],
        onDateSelect: function (newdate) {
            console.log([ 'date changed', newdate ]);
        },
        onRangeChange: function (newrange) {
            console.log([ 'range changed', newrange[0], newrange[1] ]);
        }
    });

It looks like datespan and datelimit aren't used, but range is used. This can be found in the code here: https://github.com/OpenHistoricalMap/openhistoricaltiles/blob/gh-pages/leaflet-control-mbgltimeslider/demo/index.js#L34-L42

gregallensworth commented 5 years ago

Fixed. Commit 6743804 corrects datespan to range

Commit b10e275 updates internal docs a little, clarifying the origin of the datelimit and date settings if they are not provided.