Skip to content

Commit

Permalink
Migration vers https://data.geopf.fr (anciennement wxs.ign.fr)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Horde committed Nov 17, 2023
1 parent a3e4fc5 commit 8a34ce5
Show file tree
Hide file tree
Showing 10 changed files with 3,020 additions and 602 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ En prenant par exemple `GEOPORTAL_API_KEY='parcellaire'`
var Client = require('geoportal-wfs-client');

var options = {
"apiKey": "GEOPORTAL_API_KEY",
"headers":{
"Referer": 'https://mon-application.fr'
}
Expand All @@ -50,9 +49,8 @@ var client = new GeoportalWfsClient(options);
<script src="dist/geoportal-wfs-client.js"></script>
<script type="text/javascript">

var options = {
"apiKey": GEOPORTAL_API_KEY
};
var options = {};

var client = new GeoportalWfsClient(options);
</script>
```
Expand Down Expand Up @@ -98,7 +96,7 @@ client.getTypeNames()
]
```

## client.getFeatures(typeName,params) - récupérer les objets d'un type
## client.getFeatures(typeName,params,method='post') - récupérer les objets d'un type

### Exemple d'utilisation

Expand All @@ -109,7 +107,7 @@ const params = {
code_insee: '25349',
section: '0A'
};
client.getFeatures("CADASTRALPARCELS.PARCELLAIRE_EXPRESS:parcelle",params)
client.getFeatures("CADASTRALPARCELS.PARCELLAIRE_EXPRESS:parcelle", params, 'get')
.then(function(featureCollection){
console.log(featureCollection);
})
Expand Down
2 changes: 1 addition & 1 deletion demo/parcelle.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Renvoie l'URL de la couche geoportail
*/
function getGeoportalURL( layerName ){
var url = "https://wxs.ign.fr/essentiels/geoportail/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile";
var url = "https://data.geopf.fr/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile";
url += "&LAYER="+layerName;
url += "&STYLE=normal&FORMAT=image/png";
url += "&TILEMATRIXSET=PM&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}" ;
Expand Down
Loading

0 comments on commit 8a34ce5

Please sign in to comment.