Skip to content
Snippets Groups Projects
Commit 1ebb9579 authored by Matthieu Benoist's avatar Matthieu Benoist
Browse files

Fix displayed service URL for Shapefile with insee filter.

Corrects the displayed URL for WS in API tab, when cutout by insee code
was used.
parent 3d847f31
Branches
Tags
1 merge request!75Fixes for some CGU popin and WS tab problems
...@@ -258,7 +258,7 @@ export class ResourceQueryableComponent implements OnInit { ...@@ -258,7 +258,7 @@ export class ResourceQueryableComponent implements OnInit {
} }
updateQueryableurlToDisplay() { updateQueryableurlToDisplay() {
let queryableUrlToDisplay = ''; let queryableUrlToDisplay:string = '';
queryableUrlToDisplay = this.queryableParameters.baseUrl queryableUrlToDisplay = this.queryableParameters.baseUrl
+ this.queryableParameters.baseParameters + this.queryableParameters.baseParameters
...@@ -387,7 +387,7 @@ export class ResourceQueryableComponent implements OnInit { ...@@ -387,7 +387,7 @@ export class ResourceQueryableComponent implements OnInit {
`${this.inseeLabel}</PropertyName><Literal>${this.selectedInsee.insee}` + `${this.inseeLabel}</PropertyName><Literal>${this.selectedInsee.insee}` +
'</Literal></PropertyIsLike> </Filter>'; '</Literal></PropertyIsLike> </Filter>';
} else if (this.resource.type === linkFormats.ws) { } else if (this.resource.type === linkFormats.ws) {
this.queryableParameters.baseUrl = this.resource.metadataLink.name.replace('\/all.json', ''); this.queryableParameters.baseUrl = this.resource.metadataLink.url.replace('\/all.json', '');
const match = (/\/ws\/([^\/]+)/g).exec(this.resource.metadataLink.url); const match = (/\/ws\/([^\/]+)/g).exec(this.resource.metadataLink.url);
const serviceName = match[1] ? match[1] : ''; const serviceName = match[1] ? match[1] : '';
this.queryableParameters.insee = `&mask_db=${serviceName}&mask_layer=adr_voie_lieu.adrcommune` + this.queryableParameters.insee = `&mask_db=${serviceName}&mask_layer=adr_voie_lieu.adrcommune` +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment