[OpenLayers-Users] WMTS doesnt match

Tondo gpktondo at gmail.com
Thu Mar 14 06:45:21 PDT 2013


Hi lists,

I have a problem with displaying WMTS layer. Whole layer is shifted by
several tens of kilometers. Unfortunately, I can not give you the URL of the
service. Are there any known problems with WMTS Class?

Here is my code:
_map = new OpenLayers.Map("mw", {
    layers:
        [
            new OpenLayers.Layer.WMTS({
                name: "Base",
                url: "<URL>",
                layer: "<NAME>",
                matrixSet: "<MATRIX_SET>",
                matrixIds: [
                    {
                        identifier: "0",
                        topLeftCorner: new OpenLayers.LonLat(-716800,
-1003520),
                        tileWidth: 256,
                        tileHeight: 256
                    },
                    {
                        identifier: "1",
                        topLeftCorner: new OpenLayers.LonLat(-645120,
-1075200),
                        tileWidth: 256,
                        tileHeight: 256
                    },
                    {
                        identifier: "2",
                        topLeftCorner: new OpenLayers.LonLat(-609280,
-1111040),
                        tileWidth: 256,
                        tileHeight: 256
                    },
                    {
                        identifier: "3",
                        topLeftCorner: new OpenLayers.LonLat(-609280,
-1111040),
                        tileWidth: 256,
                        tileHeight: 256
                    },
                    {
                        identifier: "4",
                        topLeftCorner: new OpenLayers.LonLat(-602112,
-1118208),
                        tileWidth: 256,
                        tileHeight: 256
                    },
                    {
                        identifier: "5",
                        topLeftCorner: new OpenLayers.LonLat(-602112,
-1118208),
                        tileWidth: 256,
                        tileHeight: 256
                    },
                    {
                        identifier: "6",
                        topLeftCorner: new OpenLayers.LonLat(-600320,
-1118208),
                        tileWidth: 256,
                        tileHeight: 256
                    },
                    {
                        identifier: "7",
                        topLeftCorner: new OpenLayers.LonLat(-600678.4,
-1119641.6),
                        tileWidth: 256,
                        tileHeight: 256
                    },
                    {
                        identifier: "8",
                        topLeftCorner: new OpenLayers.LonLat(-600320,
-1119641.6),
                        tileWidth: 256,
                        tileHeight: 256
                    },
                    {
                        identifier: "9",
                        topLeftCorner: new OpenLayers.LonLat(-600104.96,
-1119928.32),
                        tileWidth: 256,
                        tileHeight: 256
                    }
                ],
                format: "image/png",
                style: "Default",
                opacity: 0.2,
                isBaseLayer: true
            })
        ],
    scales: [2000000, 1000000, 500000, 250000, 100000, 50000, 25000, 10000,
5000, 2000],
    maxExtent: new OpenLayers.Bounds(-600000, -1335000, -165000, -1120000),
    units: "m",
    projection: "EPSG:102067"
});

_productLayer = new OpenLayers.Layer.WMS("WMS", "<URL>",
{
    layers: "<NAME>",
    format: "image/png",
    //ratio: 0.2,
    singleTile: true,

    transparent: 'true'
},
{
    isBaseLayer: false,
    singleTile: false,
    transitionEffect: "resize",
});

I checked WMS Layer (fits perfectly), MatrixSet, MatrixIDs, projection, ...
Possibility of the damaged WMTS is low. Layers are published by the
identical map server of the same data.

I know it's not a lot of info to work with... :(

Thanks,
Tom.




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/WMTS-doesnt-match-tp5040367.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list