Skip to content

Commit

Permalink
add projection
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilmanuel committed Aug 23, 2023
1 parent 48644a5 commit 469d35b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions geoengine_swisstopo/static/src/js/geoengine_swisstopo.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var RESOLUTIONS = [
0.25, 0.1
];

var BASE_URL = 'https://wmts{0-9}.geo.admin.ch/1.0.0/{Layer}/default/{Time}/21781/{TileMatrix}/{TileRow}/{TileCol}.{format}';
var BASE_URL = 'https://wmts{0-9}.geo.admin.ch/1.0.0/{Layer}/default/{Time}/{TileMatrix}/{TileMatrixSet}/{TileRow}/{TileCol}.{format}';

var ATTRIBUTIONS = '<a target="_blank" href="https://www.swisstopo.admin.ch">swisstopo</a>';

Expand Down Expand Up @@ -67,7 +67,6 @@ odoo.define('geoengine_swisstopo.projection_EPSG_21781', function (require) {
});
});


odoo.define('geoengine_swisstopo.BackgroundLayers', function (require) {
"use strict";

Expand All @@ -92,7 +91,7 @@ odoo.define('geoengine_swisstopo.BackgroundLayers', function (require) {
var layer = l.layername || 'ch.swisstopo.pixelkarte-farbe';

var url = BASE_URL.replace('{format}', format);
var projection = ol.proj.get(PROJECTION_CODE);
var projection = ol.proj.get('EPSG:4326');
var source = new ol.source.WMTS({
attributions: [
new ol.Attribution({
Expand All @@ -107,7 +106,7 @@ odoo.define('geoengine_swisstopo.BackgroundLayers', function (require) {
requestEncoding: 'REST',
layer: layer,
style: 'default',
matrixSet: '21781',
matrixSet: "4326",
format: 'image/' + format,
tileGrid: this.createTileGrid(),
crossOrigin: 'anonymous',
Expand Down

0 comments on commit 469d35b

Please sign in to comment.