Skip to content

Commit

Permalink
refactor(source): The projection option to instance a TMS and WMTS so…
Browse files Browse the repository at this point in the history
…urce is mandatory.

BREAKING CHANGE:
The projection option to instance a TMS and WMTS source is mandatory.
  • Loading branch information
gchoqueux committed Jul 29, 2019
1 parent f191a74 commit 1f35627
Show file tree
Hide file tree
Showing 18 changed files with 17 additions and 91 deletions.
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/Administrative.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"opacity": 1,
"transparent": true,
"source": {
"projection": "EPSG:3857",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"tileMatrixSet": "PM",
"format": "image/png",
Expand Down
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/Cada.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"transparent": true,
"source": {
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"projection": "EPSG:3857",
"networkOptions": {
"crossOrigin": "omit"
},
Expand Down
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/Cassini.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"id": "Cassini",
"source": {
"url": "http://wxs.ign.fr/va5orxd0pgzvq3jxutqfuy0b/geoportail/wmts",
"projection": "EPSG:3857",
"networkOptions": {
"crossOrigin": "anonymous"
},
Expand Down
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/DARK.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"id": "DARK",
"source": {
"projection": "EPSG:3857",
"networkOptions": { "crossOrigin" : "anonymous" },
"format": "image/png",
"url": "http://a.basemaps.cartocdn.com/dark_all/${z}/${x}/${y}.png",
Expand Down
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/Denomination.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"transparent": true,
"source": {
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"projection": "EPSG:3857",
"tileMatrixSet": "PM",
"format": "image/png",
"name": "GEOGRAPHICALNAMES.NAMES",
Expand Down
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/EtatMajor.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"opacity": 1,
"transparent": true,
"source": {
"projection": "EPSG:3857",
"url": "http://wxs.ign.fr/va5orxd0pgzvq3jxutqfuy0b/geoportail/wmts",
"networkOptions": {
"crossOrigin": "anonymous"
Expand Down
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/IGN_MNT.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"source": {
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"projection": "EPSG:4326",
"format": "image/x-bil;bits=32",
"attribution" : {
"name":"IGN",
Expand Down
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/IGN_MNT_HIGHRES.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"source": {
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"projection": "EPSG:4326",
"format": "image/x-bil;bits=32",
"attribution" : {
"name":"IGN",
Expand Down
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/OPENSM.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"id": "OPENSM",
"source": {
"projection": "EPSG:3857",
"isInverted": true,
"format": "image/png",
"url": "http://osm.oslandia.io/styles/klokantech-basic/${z}/${x}/${y}.png",
Expand Down
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/Ortho.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"id": "Ortho",
"source": {
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"projection": "EPSG:3857",
"networkOptions": {
"crossOrigin": "anonymous"
},
Expand Down
89 changes: 0 additions & 89 deletions examples/layers/JSONLayers/OrthosCRS.json

This file was deleted.

1 change: 1 addition & 0 deletions examples/layers/JSONLayers/Railways.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"opacity": 1,
"transparent": true,
"source": {
"projection": "EPSG:3857",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"format": "image/png",
"networkOptions": {
Expand Down
3 changes: 2 additions & 1 deletion examples/layers/JSONLayers/ScanEX.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"id": "ScanEX",
"fx" : 2.5,
"source": {
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"projection": "EPSG:3857",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"format": "image/jpeg",
"name": "GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD",
"attribution" : {
Expand Down
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/Top25.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"id": "Top25",
"source": {
"projection": "EPSG:3857",
"url": "http://wxs.ign.fr/va5orxd0pgzvq3jxutqfuy0b/geoportail/wmts",
"networkOptions": {
"crossOrigin": "anonymous"
Expand Down
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/Transport.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"opacity": 1,
"transparent": true,
"source": {
"projection": "EPSG:3857",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"format": "image/png",
"networkOptions": {
Expand Down
1 change: 1 addition & 0 deletions examples/layers/JSONLayers/WORLD_DTM.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"source": {
"format": "image/x-bil;bits=32",
"projection": "EPSG:4326",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"name": "ELEVATION.ELEVATIONGRIDCOVERAGE.SRTM3",
"tileMatrixSet": "WGS84G",
Expand Down
1 change: 1 addition & 0 deletions examples/tiff.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
var tiffSource = new itowns.TMSSource({
url: 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/geoid/localcolors/tiff/${z}/localcolors_${x}_${y}.tif',
tileMatrixSet: 'WGS84G',
projection: 'EPSG:4326',
parser: TIFFParser.parse,
fetcher: itowns.Fetcher.arrayBuffer,
zoom: { min: 0, max: 4 },
Expand Down
1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
}

itowns.Fetcher.json('examples/layers/JSONLayers/Ortho.json').then(createWMTSSourceFromConfig).then(addColorLayerFromConfig);
itowns.Fetcher.json('examples/layers/JSONLayers/OrthosCRS.json').then(createWMTSSourceFromConfig).then(addColorLayerFromConfig);
itowns.Fetcher.json('examples/layers/JSONLayers/ScanEX.json').then(createWMTSSourceFromConfig).then(addColorLayerFromConfig);
itowns.Fetcher.json('examples/layers/JSONLayers/Region.json')
.then(function _(config) {
Expand Down

0 comments on commit 1f35627

Please sign in to comment.