Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible to change timeinterval after creating map object? #205

Open
tekija opened this issue Mar 5, 2021 · 0 comments
Open

is it possible to change timeinterval after creating map object? #205

tekija opened this issue Mar 5, 2021 · 0 comments

Comments

@tekija
Copy link

tekija commented Mar 5, 2021

after creating map:

     map =  L.map('map', {

        timeDimension: true,
            timeDimensionOptions: {
            timeInterval: "2021-02-25T00:00:00.000Z"+"/"+"2021-02-26T23:00:00.000Z",
            period: "PT1H",
            currentTime: Date.parse("2021-02-25T00:00:00.000Z")
        }
    });

I am later in code trying to change timeInterval range via L.timeDimension:

   tds= L.timeDimension({
        timeInterval: "2021-02-25T00:30:00.000Z"+"/"+"2021-02-26T23:30:00.000Z",
        period: "PT1H",
        currentTime: Date.parse("2021-02-25T00:30:00.000Z")

    })
tds.addTo(map)

But I get error: Uncaught TypeError: this.onAdd is not a function
Is it even possible to change timeInterval after creating map? I guess I am not casting something properly, any help is appreceated. Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant