Skip to content

Commit

Permalink
fix(example): migrate sources to IGN geoplateforme
Browse files Browse the repository at this point in the history
  • Loading branch information
ftoromanoff authored and Desplandis committed Mar 13, 2024
1 parent bf38a72 commit f6baf69
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
22 changes: 11 additions & 11 deletions examples/source_stream_wfs_25d.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
var wfsCartoSource = new itowns.WFSSource({
url: 'https://data.geopf.fr/wfs/ows?',
version: '2.0.0',
typeName: 'BDCARTO_BDD_WLD_WGS84G:zone_habitat_mairie',
typeName: 'BDCARTO_V5:zone_d_habitation',
crs: 'EPSG:3946',
ipr: 'IGN',
format: 'application/json',
Expand All @@ -284,24 +284,24 @@
text: {
field: '{toponyme}',
color: (p) => {
switch (p.importance) {
case 'Quartier de ville':
return 'Cornsilk';
case 'Hameau':
switch (p.nature) {
case 'Quartier':
return 'WhiteSmoke';
case 'Chef-lieu de commune':
case 'Château':
return 'Cornsilk';
case 'Lieu-dit habité':
default:
return 'white';
}
},
transform: 'uppercase',
size: (p) => {
switch (p.importance) {
case 'Quartier de ville':
return 11;
case 'Hameau':
switch (p.nature) {
case 'Quartier':
return 13;
case 'Chef-lieu de commune':
case 'Château':
return 11;
case 'Lieu-dit habité':
default:
return 18;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/source_stream_wfs_3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
view.addFrameRequester(itowns.MAIN_LOOP_EVENTS.BEFORE_RENDER, scaler);

var wfsBuildingSource = new itowns.WFSSource({
url: 'https://wxs.ign.fr/topographie/geoportail/wfs?',
url: 'https://data.geopf.fr/wfs/ows?',
version: '2.0.0',
typeName: 'BDTOPO_V3:batiment',
crs: 'EPSG:4326',
Expand Down
4 changes: 2 additions & 2 deletions examples/view_25d_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@
view.addLayer(wmsElevationLayer);

var wfsCartoSource = new itowns.WFSSource({
url: 'https://wxs.ign.fr/cartovecto/geoportail/wfs?',
url: 'https://data.geopf.fr/wfs/ows?',
version: '2.0.0',
typeName: 'BDCARTO_BDD_WLD_WGS84G:zone_habitat_mairie',
typeName: 'BDCARTO_V5:zone_d_habitation',
crs: 'EPSG:3946',
ipr: 'IGN',
format: 'application/json',
Expand Down
4 changes: 2 additions & 2 deletions examples/view_3d_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@
// Define options for geocoding service that should be used by the searchbar.
const geocodingOptions = {
url: new URL(
'https://wxs.ign.fr/ayxvok72rcocdyn8xyvy32og/ols/apis/completion?text=&type=StreetAddress,' +
'PositionOfInterest',
'https://data.geopf.fr/geocodage/completion?' +
'text=&type=StreetAddress,PositionOfInterest',
),
parser: (response) => {
const map = new Map();
Expand Down
4 changes: 2 additions & 2 deletions examples/view_3d_mns_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@
// Define options for geocoding service that should be used by the searchbar.
const geocodingOptions = {
url: new URL(
'https://wxs.ign.fr/ayxvok72rcocdyn8xyvy32og/ols/apis/completion?text=&type=StreetAddress,' +
'PositionOfInterest',
'https://data.geopf.fr/geocodage/completion?' +
'text=&type=StreetAddress,PositionOfInterest',
),
parser: (response) => {
const map = new Map();
Expand Down
2 changes: 1 addition & 1 deletion examples/view_immersive.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
view.addLayer(olayer, view.tileLayer).then(function addWfsLayer(orientedImageLayer) {
// prepare WFS source for the buildings
var wfsBuildingSource = new itowns.WFSSource({
url: 'https://wxs.ign.fr/topographie/geoportail/wfs?',
url: 'https://data.geopf.fr/wfs/ows?',
version: '2.0.0',
typeName: 'BDTOPO_V3:batiment',
crs: 'EPSG:4326',
Expand Down
4 changes: 2 additions & 2 deletions examples/widgets_searchbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@
// Define options for geocoding service that should be used by the searchbar.
const geocodingOptions = {
url: new URL(
'https://wxs.ign.fr/ayxvok72rcocdyn8xyvy32og/ols/apis/completion?text=&type=StreetAddress,' +
'PositionOfInterest',
'https://data.geopf.fr/geocodage/completion?' +
'text=&type=StreetAddress,PositionOfInterest',
),
// As precised in the doc (http://www.itowns-project.org/itowns/docs/#api/Widgets/Searchbar), the parser
// method must parse the geocoding service response into a Map object. For each item of this Map, the
Expand Down

0 comments on commit f6baf69

Please sign in to comment.