Skip to content
New issue

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

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

Already on GitHub? # to your account

MVT and reprojections #600

Open
cazitouni opened this issue Jan 26, 2025 · 1 comment
Open

MVT and reprojections #600

cazitouni opened this issue Jan 26, 2025 · 1 comment

Comments

@cazitouni
Copy link

cazitouni commented Jan 26, 2025

Hello @manisandro,

I opened this issue because I encountered a problem regarding MVT layers. Based on the Cyclomedia plugin, I am trying to implement a new one for the Panoramax API.

The problem is, unlike Cyclomedia, Panoramax uses MVT to retrieve picture records and sequences. So, I created a small function that works great when the map is in EPSG 3857 but not for other EPSG projections.

As I understand from the documentation, it should be possible to use MVT in different projections by specifying a resolution set and origin, but when I try, for example, EPSG 2056, it results in nothing good.

    addRecordingsMVT = () => {
        const resolutions = MapUtils.getResolutionsForScales(this.props.theme.scales, "EPSG:2056");
        const layer = {
            id: 'Panoramax-recordings',
            type: 'mvt',
            projection: "EPSG:2056",
            tileGridConfig: {
                origin: [0, 0], //or [2660013.54, 1185171.98] didnt work either
                resolutions: resolutions
            },
            style: 'https://api.panoramax.xyz/api/map/style.json',
            role: LayerRole.USERLAYER
        };
        this.props.addLayer(layer);
    };

Maybe I’m mistaken, but do you need the MVT to be in the target EPSG as well? Or maybe I just made a mistake determining the origin and scales.

Anyway, I’ll continue looking into it, but if you already have a solution for this, I’m all ears.

Kind regards,
Clément.

@pka
Copy link
Member

pka commented Jan 27, 2025

I am trying to implement a new one for the Panoramax API.

👍 !

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

No branches or pull requests

2 participants