Skip to content

Slider show two date ranges ? #3

@doctor343434

Description

@doctor343434

Hello, I am using your plugin. I ran my application with the JSON file installation codes that you gave in the questions I asked before.
While Slider is giving the date range, I cannot show the date of the back bar as a range. How can I solve this?

    //var data = JSON.parse(YOUR_JSON); //When your json is a String and not a Object
    var fg = L.featureGroup();
    data.forEach((g)=>{
        var group = L.featureGroup();
        var time = null;
        g.forEach((obj)=>{
            L.circleMarker([obj.lat, obj.lng],{radius: obj.radius, time: ""+obj.time}).addTo(group);
            time = ""+obj.time;
        });
        group.options.time = time;
        group.addTo(fg);
    });

    var sliderControl = L.control.sliderControl({layer: fg, timeStrLength: 10, rezoom: 6});
    mymap.addControl(sliderControl);
    sliderControl.startSlider();

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions