Skip to content

Commit

Permalink
fix(examples): update deprecated 'projection' parameter/property to '…
Browse files Browse the repository at this point in the history
…crs'.
  • Loading branch information
gchoqueux committed Sep 30, 2020
1 parent 3d35877 commit d204f65
Show file tree
Hide file tree
Showing 34 changed files with 54 additions and 54 deletions.
6 changes: 3 additions & 3 deletions examples/3dtiles_25d.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script src="js/GUI/GuiTools.js"></script>
<script src="js/3dTilesHelper.js"></script>
<script type="text/javascript">
// Define projection that we will use (taken from https://epsg.io/3946, Proj4js section)
// Define crs projection that we will use (taken from https://epsg.io/3946, Proj4js section)
itowns.proj4.defs('EPSG:3946', '+proj=lcc +lat_1=45.25 +lat_2=46.75 +lat_0=46 +lon_0=3 +x_0=1700000 +y_0=5200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs');

// Define geographic extent: CRS, min/max X, min/max Y
Expand All @@ -41,7 +41,7 @@
name: 'Ortho2009_vue_ensemble_16cm_CC46',
url: 'https://download.data.grandlyon.com/wms/grandlyon',
version: '1.3.0',
projection: 'EPSG:3946',
crs: 'EPSG:3946',
format: 'image/jpeg',
});

Expand All @@ -61,7 +61,7 @@
extent: extent,
url: 'https://download.data.grandlyon.com/wms/grandlyon',
name: 'MNT2012_Altitude_10m_CC46',
projection: 'EPSG:3946',
crs: 'EPSG:3946',
width: 256,
format: 'image/jpeg',
});
Expand Down
4 changes: 2 additions & 2 deletions examples/js/plugins/DragNDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* displayed are stored in the plugin. Use the method `register` to declare the
* way a file is read, parsed and displayed.
*
* Note: only files with the projection `EPSG:4326` can be projected correctly
* Note: only files with the crs projection `EPSG:4326` can be projected correctly
* using this plugin.
*
* @module DragNDrop
Expand Down Expand Up @@ -78,7 +78,7 @@ var DragNDrop = (function _() {

var source = new itowns.FileSource({
parsedData: result,
projection: 'EPSG:4326',
crs: 'EPSG:4326',
});

var randomColor = Math.round(Math.random() * 0xffffff);
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Administrative.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"opacity": 1,
"transparent": true,
"source": {
"projection": "EPSG:3857",
"crs": "EPSG:3857",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"format": "image/png",
"name": "LIMITES_ADMINISTRATIVES_EXPRESS.LATEST",
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Cada.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"transparent": true,
"source": {
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"projection": "EPSG:3857",
"crs": "EPSG:3857",
"networkOptions": {
"crossOrigin": "omit"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Cassini.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "Cassini",
"source": {
"url": "http://wxs.ign.fr/va5orxd0pgzvq3jxutqfuy0b/geoportail/wmts",
"projection": "EPSG:3857",
"crs": "EPSG:3857",
"networkOptions": {
"crossOrigin": "anonymous"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/DARK.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "DARK",
"source": {
"projection": "EPSG:3857",
"crs": "EPSG:3857",
"networkOptions": { "crossOrigin" : "anonymous" },
"format": "image/png",
"url": "http://a.basemaps.cartocdn.com/dark_all/${z}/${x}/${y}.png",
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Denomination.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"transparent": true,
"source": {
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"projection": "EPSG:3857",
"crs": "EPSG:3857",
"tileMatrixSet": "PM",
"format": "image/png",
"name": "GEOGRAPHICALNAMES.NAMES",
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/EtatMajor.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"opacity": 1,
"transparent": true,
"source": {
"projection": "EPSG:3857",
"crs": "EPSG:3857",
"url": "http://wxs.ign.fr/va5orxd0pgzvq3jxutqfuy0b/geoportail/wmts",
"networkOptions": {
"crossOrigin": "anonymous"
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/GeoidMNT.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"source": {
"url": "https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/geoid/geoid/bil/%TILEMATRIX/geoid_%COL_%ROW.bil",
"format": "image/x-bil;bits=32",
"projection": "EPSG:4326",
"crs": "EPSG:4326",
"tileMatrixSet": "WGS84G",
"tileMatrixSetLimits": {
"0": {
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/IGN_MNT.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"source": {
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"projection": "EPSG:4326",
"crs": "EPSG:4326",
"format": "image/x-bil;bits=32",
"attribution" : {
"name":"IGN",
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/IGN_MNT_HIGHRES.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"source": {
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"projection": "EPSG:4326",
"crs": "EPSG:4326",
"format": "image/x-bil;bits=32",
"attribution" : {
"name":"IGN",
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/OPENSM.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "OPENSM",
"source": {
"projection": "EPSG:3857",
"crs": "EPSG:3857",
"isInverted": true,
"format": "image/png",
"url": "http://osm.oslandia.io/styles/klokantech-basic/${z}/${x}/${y}.png",
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Ortho.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "Ortho",
"source": {
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"projection": "EPSG:3857",
"crs": "EPSG:3857",
"networkOptions": {
"crossOrigin": "anonymous"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Railways.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"opacity": 1,
"transparent": true,
"source": {
"projection": "EPSG:3857",
"crs": "EPSG:3857",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"format": "image/png",
"networkOptions": {
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Region.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"version" : "1.3.0",
"name" : "REGIONS.2017",
"style" : "",
"projection" : "EPSG:3857",
"crs" : "EPSG:3857",
"extent": {
"west": "-6880639.13669047",
"east": "6215707.87640867",
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/ScanEX.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "ScanEX",
"fx" : 2.5,
"source": {
"projection": "EPSG:3857",
"crs": "EPSG:3857",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"format": "image/jpeg",
"name": "GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD",
Expand Down
4 changes: 2 additions & 2 deletions examples/layers/JSONLayers/Top25.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"id": "Top25",
"source": {
"projection": "EPSG:3857",
"crs": "EPSG:3857",
"url": "http://wxs.ign.fr/va5orxd0pgzvq3jxutqfuy0b/geoportail/wmts",
"networkOptions": {
"crossOrigin": "anonymous"
},
},
"format": "image/jpeg",
"attribution" : {
"name":"IGN",
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/Transport.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"opacity": 1,
"transparent": true,
"source": {
"projection": "EPSG:3857",
"crs": "EPSG:3857",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"format": "image/png",
"networkOptions": {
Expand Down
2 changes: 1 addition & 1 deletion examples/layers/JSONLayers/WORLD_DTM.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"source": {
"format": "image/x-bil;bits=32",
"projection": "EPSG:4326",
"crs": "EPSG:4326",
"url": "https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wmts",
"name": "ELEVATION.ELEVATIONGRIDCOVERAGE.SRTM3",
"tileMatrixSet": "WGS84G",
Expand Down
4 changes: 2 additions & 2 deletions examples/misc_compare_25d_3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<script src="../dist/itowns.js"></script>
<script src="../dist/debug.js"></script>
<script type="text/javascript">
// Define projection that we will use (taken from https://epsg.io/3946, Proj4js section)
// Define crs projection that we will use (taken from https://epsg.io/3946, Proj4js section)
itowns.proj4.defs('EPSG:3946', '+proj=lcc +lat_1=45.25 +lat_2=46.75 +lat_0=46 +lon_0=3 +x_0=1700000 +y_0=5200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs');
/* global itowns, document, GuiTools, Promise */
var placement = {
Expand Down Expand Up @@ -140,7 +140,7 @@
name: 'Ortho2009_vue_ensemble_16cm_CC46',
url: 'https://download.data.grandlyon.com/wms/grandlyon',
version: '1.3.0',
projection: 'EPSG:3946',
crs: 'EPSG:3946',
format: 'image/jpeg',
});

Expand Down
2 changes: 1 addition & 1 deletion examples/plugins_drag_n_drop.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div id="viewerDiv">
<div id="description">Drag and drop a Geojson or Gpx file onto the
viewer, and see it loaded as a ColorLayer. Only files with the
projection <b>EPSG:4326</b> can be projected correctly in this
crs projection <b>EPSG:4326</b> can be projected correctly in this
demo. More information about the plugin used <a
href="http://www.itowns-project.org/itowns/docs/#api/Plugins/DragNDrop"
target="_blank">in the documentation.</a></div>
Expand Down
2 changes: 1 addition & 1 deletion examples/plugins_pyramidal_tiff.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,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',
crs: 'EPSG:4326',
parser: TIFFParser.parse,
fetcher: itowns.Fetcher.arrayBuffer,
zoom: { min: 0, max: 4 },
Expand Down
2 changes: 1 addition & 1 deletion examples/potree_25d_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
source: new itowns.PotreeSource({
file: 'eglise_saint_blaise_arles.js',
url: 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/pointclouds/eglise_saint_blaise_arles',
projection: view.referenceCrs,
crs: view.referenceCrs,
}),
});

Expand Down
2 changes: 1 addition & 1 deletion examples/potree_3d_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
source: new itowns.PotreeSource({
file: 'eglise_saint_blaise_arles.js',
url: 'https://raw.githubusercontent.com/gmaillet/dataset/master/',
projection: view.referenceCrs,
crs: view.referenceCrs,
}),
});

Expand Down
2 changes: 1 addition & 1 deletion examples/source_file_geojson_3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// Use a FileSource to load a single file once
source: new itowns.FileSource({
url: 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/multipolygon.geojson',
projection: 'EPSG:4326',
crs: 'EPSG:4326',
format: 'application/json',
}),
zoom: { min: 10 },
Expand Down
2 changes: 1 addition & 1 deletion examples/source_file_gpx_raster.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@

var gpxSource = new itowns.FileSource({
fetchedData: gpx,
projection: 'EPSG:4326',
crs: 'EPSG:4326',
parser: itowns.GpxParser.parse,
});

Expand Down
2 changes: 1 addition & 1 deletion examples/source_file_kml_raster.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
// Fetch, Parse and Convert by iTowns
var kmlSource = new itowns.FileSource({
url: 'https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/croquis.kml',
projection: 'EPSG:4326',
crs: 'EPSG:4326',
fetcher: itowns.Fetcher.xml,
parser: itowns.KMLParser.parse,
});
Expand Down
16 changes: 8 additions & 8 deletions examples/source_stream_wfs_25d.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<script src="../dist/itowns.js"></script>
<script src="js/GUI/LoadingScreen.js"></script>
<script type="text/javascript">
// Define projection that we will use (taken from https://epsg.io/3946, Proj4js section)
// Define crs projection that we will use (taken from https://epsg.io/3946, Proj4js section)
itowns.proj4.defs('EPSG:3946', '+proj=lcc +lat_1=45.25 +lat_2=46.75 +lat_0=46 +lon_0=3 +x_0=1700000 +y_0=5200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs');
/* global itowns,document, setupLoadingScreen, window */

Expand Down Expand Up @@ -68,7 +68,7 @@
networkOptions: { crossOrigin: 'anonymous' },
version: '1.3.0',
name: 'Ortho2009_vue_ensemble_16cm_CC46',
projection: 'EPSG:3946',
crs: 'EPSG:3946',
extent: extent,
format: 'image/jpeg',
});
Expand All @@ -86,7 +86,7 @@
extent: extent,
url: 'https://download.data.grandlyon.com/wms/grandlyon',
name: 'MNT2012_Altitude_10m_CC46',
projection: 'EPSG:3946',
crs: 'EPSG:3946',
width: 256,
format: 'image/jpeg',
});
Expand Down Expand Up @@ -152,7 +152,7 @@
version: '2.0.0',
id: 'tcl_bus',
typeName: 'tcl_sytral.tcllignebus',
projection: 'EPSG:3946',
crs: 'EPSG:3946',
extent: {
west: 1822174.60,
east: 1868247.07,
Expand Down Expand Up @@ -219,7 +219,7 @@
url: 'https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wfs?',
version: '2.0.0',
typeName: 'BDTOPO_BDD_WLD_WGS84G:bati_remarquable,BDTOPO_BDD_WLD_WGS84G:bati_indifferencie,BDTOPO_BDD_WLD_WGS84G:bati_industriel',
projection: 'EPSG:4326',
crs: 'EPSG:4326',
ipr: 'IGN',
format: 'application/json',
extent: {
Expand All @@ -243,7 +243,7 @@
},
filter: acceptFeature,
overrideAltitudeInToZero: true,
projection: 'EPSG:3946',
crs: 'EPSG:3946',
source: wfsBuildingSource,
zoom: { min: 4 },
});
Expand All @@ -254,7 +254,7 @@
url: 'https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wfs?',
version: '2.0.0',
typeName: 'BDCARTO_BDD_WLD_WGS84G:zone_habitat',
projection: 'EPSG:4326',
crs: 'EPSG:4326',
ipr: 'IGN',
format: 'application/json',
extent: {
Expand All @@ -277,7 +277,7 @@
});

var wfsCartoLayer = new itowns.LabelLayer('wfsCarto', 'EPSG:3946');
wfsCartoLayer.projection = 'EPSG:3946';
wfsCartoLayer.crs = 'EPSG:3946';
wfsCartoLayer.source = wfsCartoSource;
wfsCartoLayer.style = wfsCartoStyle;

Expand Down
6 changes: 3 additions & 3 deletions examples/source_stream_wfs_3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</ul>
</div>
<script type="text/javascript">
// Define projection that we will use (taken from https://epsg.io/3946, Proj4js section)
// Define crs projection that we will use (taken from https://epsg.io/3946, Proj4js section)
itowns.proj4.defs('EPSG:3946', '+proj=lcc +lat_1=45.25 +lat_2=46.75 +lat_0=46 +lon_0=3 +x_0=1700000 +y_0=5200000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs');
// # Simple Globe viewer

Expand Down Expand Up @@ -100,7 +100,7 @@
url: 'https://download.data.grandlyon.com/wfs/rdata?',
version: '2.0.0',
typeName: 'tcl_sytral.tcllignebus',
projection: 'EPSG:3946',
crs: 'EPSG:3946',
extent: {
west: 1822174.60,
east: 1868247.07,
Expand Down Expand Up @@ -167,7 +167,7 @@
url: 'https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wfs?',
version: '2.0.0',
typeName: 'BDTOPO_BDD_WLD_WGS84G:bati_remarquable,BDTOPO_BDD_WLD_WGS84G:bati_indifferencie,BDTOPO_BDD_WLD_WGS84G:bati_industriel',
projection: 'EPSG:4326',
crs: 'EPSG:4326',
ipr: 'IGN',
format: 'application/json',
extent: {
Expand Down
2 changes: 1 addition & 1 deletion examples/source_stream_wfs_raster.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
url: 'https://wxs.ign.fr/3ht7xcw6f7nciopo16etuqp2/geoportail/wfs?',
version: '2.0.0',
typeName: 'BDTOPO_BDD_WLD_WGS84G:bati_remarquable,BDTOPO_BDD_WLD_WGS84G:bati_indifferencie,BDTOPO_BDD_WLD_WGS84G:bati_industriel',
projection: 'EPSG:4326',
crs: 'EPSG:4326',
extent: {
west: 4.568,
east: 5.18,
Expand Down
Loading

0 comments on commit d204f65

Please sign in to comment.