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

Fix #1304 Implemented WMTS on OpenLayers #1341

Closed
wants to merge 5 commits into from
Closed

Fix #1304 Implemented WMTS on OpenLayers #1341

wants to merge 5 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 9, 2016

#1304 Implemented support for WMTS on OpenLayers.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 80.201% when pulling bb36feb on sp13adt:wmts_openlayers into bdeb615 on geosolutions-it:master.

@@ -102,6 +102,25 @@
}
},
{
"type": "wmts",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this layer from default configuration

create: (options) => {
const urls = getWMSURLs(isArray(options.url) ? options.url : [options.url]);
const queryParameters = wmtsToOpenlayersOptions(options) || {};
var projection = ol.proj.get('EPSG:900913');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the srs in options, not a fixed 900913

matrixSet: options.tileMatrixSet,
format: 'image/png',
tileGrid: new ol.tilegrid.WMTS({
origin: ol.extent.getTopLeft(projectionExtent),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consider using originX and originY options as we do for leaflet

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.05%) to 80.204% when pulling ff98527 on sp13adt:wmts_openlayers into 5b03ce0 on geosolutions-it:master.

let matrixIds = new Array(22);
for (let z = 0; z < 22; ++z) {
// generate matrixIds arrays for this WMTS
matrixIds[z] = options.tileMatrixPrefix + z;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have a list of matrixIds as a configuration option. In the future it have to be populated checking the catalog. If the list is not present in configuration, this autogeneration method can be the solution.

const urls = getWMSURLs(isArray(options.url) ? options.url : [options.url]);
const queryParameters = wmtsToOpenlayersOptions(options) || {};
urls.forEach(url => SecurityUtils.addAuthenticationParameter(url, queryParameters));
let matrixIds = new Array(22);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tile matrix zoom levels are not 22 everywhere. Even when auto-generation is used, the list of resolutions and matrixIds can be variable. In general we should follow the information from WMTS.
Keep in mind these 2 examples:

As you see the identifier and the list are not the same.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.07%) to 80.179% when pulling 08712b2 on sp13adt:wmts_openlayers into 5b03ce0 on geosolutions-it:master.

@mbarto
Copy link
Contributor

mbarto commented Jan 25, 2017

Replaced by #1397

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

Successfully merging this pull request may close these issues.

5 participants