Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AUS-3905 The custom icon for legends should appear in the "Info" popup panel #261

Merged
merged 3 commits into from
May 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { Component, Inject, Input, OnChanges, SimpleChanges } from '@angular/core';
import { CSWRecordModel, LayerModel, OnlineResourceModel, UtilitiesService } from '@auscope/portal-core-ui';


Expand All @@ -16,7 +16,7 @@ export class InfoPanelSubComponent implements OnChanges {
wmsUrl: any;
legendUrl: any;

constructor() {}
constructor(@Inject('env') private env) {}

/**
* Remove unwanted strings from metadata constraints fields
Expand Down Expand Up @@ -111,8 +111,9 @@ export class InfoPanelSubComponent implements OnChanges {
+ '&LAYER=' + wmsOnlineResource.name + '&LAYERS=' + wmsOnlineResource.name + '&WIDTH=188&SCALE=1000000'
+ '&LEGEND_OPTIONS=forceLabels:on;minSymbolSize:16';
this.legendUrl = UtilitiesService.addUrlParameters(UtilitiesService.rmParamURL(wmsOnlineResource.url), params);
} else if (this.layer.legendImg && this.layer.legendImg !== '') {
this.legendUrl = this.env.portalBaseUrl + 'legend/' + this.layer.legendImg;
}

// Gather up BBOX coordinates to calculate the centre and envelope
const bbox = this.cswRecord.geographicElements[0];

Expand Down