iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.08k stars 293 forks source link

[BUG - WMTS] WMTS with PlanarView #2240

Closed ketourneau closed 6 months ago

ketourneau commented 7 months ago

Your Environment

Context

We try to use a WMTS source with PlanarView and it doesn't seem to work properly. The source doesn't seem to take view extent into account.

Steps to Reproduce (for bugs)

Replace wmsImagerySource and wmsImageryLayer from view_25d_map.html by :

itowns.Fetcher.json("./layers/JSONLayers/Ortho.json").then(
    function _(config) {
        config.source = new itowns.WMTSSource(config.source);
        var layer = new itowns.ColorLayer("Ortho", config);
        view.addLayer(layer);
    }
);

Expected Behavior

Capture d’écran 2023-12-13 à 09 07 44

Actual Behavior

Capture d’écran 2023-12-13 à 09 08 21

AnthonyGlt commented 6 months ago

Hello, thanks for this feedback It's the expected behavior on iTowns, the WMTS requests are based on the zoom level so the all the source tiles will be displayed on the entire extent as a level 0. I don't know if it's the good way to go because we ignore the coordinates parameter, this behavior could be changed if it doesn't meet the necessities of the users. We are going to check if it can be implemented differently. Do you have an example of your expected behavior ? Is it like that on openlayer ? If so, we will check that.

ketourneau commented 6 months ago

Thanks for your reply and thanks for the WMTS clarification. We can stay with a WMS source in our case, which already works very well.

We have found an example of using WMTS in another solution (Microsoft.Maps.Unity) if it's can help for thinking https://github.com/bloc-in-bloc/MapsSDK-Unity/blob/custom-map-provider/SampleProject/Assets/Microsoft.Maps.Unity.Examples/CustomMapExample(IGN)/Scripts/WMTSTileLayer.cs

We consider the subject closed because it's work with WMS source.