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

Layer.getData and correspondance between 'from' and 'to' #2490

Open
ftoromanoff opened this issue Jan 23, 2025 · 0 comments
Open

Layer.getData and correspondance between 'from' and 'to' #2490

ftoromanoff opened this issue Jan 23, 2025 · 0 comments
Labels

Comments

@ftoromanoff
Copy link
Contributor

In the example source_fiole_geojson_raster.html, when we log the 'from' and 'to' parameter of the getData

    getData(from, to) {
        const key = this.source.requestToKey(this.source.isVectorSource ? to : from);
        if (this.id === 'pyrenees-orientales') {
            console.log(this.id, 'getData when source.isVectorSource');
            console.log('from', from);
            console.log('to', to);
        }
        let data = this.cache.getByArray(key);
        if (!data) {
            data = this.source.loadData(from, this)
                .then(feat => this.convert(feat, to), (err) => {
                    throw err;
                });
            this.cache.setByArray(data, key);
        }
        return data;
    }

we get this:

Image

As we can see, sometimes we have exact correspondance between 'to' and 'from' and sometimes not.
I suspect that this should be homogene...

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

No branches or pull requests

1 participant