Commit 86c83411 authored by Matthieu Benoist's avatar Matthieu Benoist
Browse files

Add a copy link button component to the download tab

parent a8dc718b
...@@ -54,8 +54,13 @@ ...@@ -54,8 +54,13 @@
<span class="sr-only">Options</span> <span class="sr-only">Options</span>
</button> </button>
<app-download-button [url]="queryableUrl" [fileName]="fileName">
</app-download-button> <app-link-copy-icon [linkUrl]="queryableUrl" [displayLink]="false" >
<div class="resource-download-icon">
<app-download-button [url]="queryableUrl" [fileName]="fileName">
</app-download-button>
</div>
</app-link-copy-icon>
</div> </div>
</div> </div>
......
...@@ -133,7 +133,6 @@ export class ResourceDownloadItemComponent implements OnInit { ...@@ -133,7 +133,6 @@ export class ResourceDownloadItemComponent implements OnInit {
get queryableUrl() { get queryableUrl() {
let queryableUrl = ''; let queryableUrl = '';
if (this.isQueryable) { if (this.isQueryable) {
queryableUrl = this.resource.metadataLink.url; queryableUrl = this.resource.metadataLink.url;
let layer = ''; let layer = '';
let outputFormat = ''; let outputFormat = '';
...@@ -161,9 +160,11 @@ export class ResourceDownloadItemComponent implements OnInit { ...@@ -161,9 +160,11 @@ export class ResourceDownloadItemComponent implements OnInit {
} }
} else if (this.resource.type === linkFormats.ws) { } else if (this.resource.type === linkFormats.ws) {
if (this.format.name === 'JSON') { if (this.format.name === 'JSON') {
queryableUrl += `/${this.resource.metadataLink.name}/all.json`; queryableUrl += `/${this.resource.metadataLink.name}/all.json?maxFeatures=-1`;
} else { } else {
queryableUrl += `/${this.resource.metadataLink.name}.shp?srsname=EPSG:3946`; const projectionAndBbox = this.getProjectionAndBbox(this.format);
queryableUrl += `/${this.resource.metadataLink.name}.shp?${projectionAndBbox.projection}`;
} }
} else if (this.resource.type === linkFormats.kml) { } else if (this.resource.type === linkFormats.kml) {
queryableUrl += `?${this.resource.parametersUrl}` + queryableUrl += `?${this.resource.parametersUrl}` +
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment