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-4221 Restrict Spatial Bounds #433

Merged
merged 1 commit into from
Aug 23, 2024
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
16 changes: 13 additions & 3 deletions src/app/menupanel/search/searchpanel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,6 @@ export class SearchPanelComponent implements OnInit {
* @param layer LayerModel of layer
*/
public layerWarningMessage(layer: LayerModel): string {
console.log("[searchpanel.component.ts]layerWarningMessage()");
return 'This layer cannot be displayed. For Featured Layers, please wait for the layer cache to rebuild itself. ' +
'For Custom Layers please note that only the following online resource types can be added to the map: ' +
this.csMapService.getSupportedOnlineResourceTypes();
Expand Down Expand Up @@ -719,10 +718,21 @@ export class SearchPanelComponent implements OnInit {
}
}

let westBounds = undefined;
let eastBounds = undefined;
let northBounds = undefined;
let southBounds = undefined;
if (this.restrictBounds && this.bbox) {
westBounds = this.bbox.westBoundLongitude;
eastBounds = this.bbox.eastBoundLongitude;
northBounds = this.bbox.northBoundLatitude;
southBounds = this.bbox.southBoundLatitude;
}

// Search CSW records
this.searchService.searchCSWRecords(this.queryText, selectedSearchFields, null, null, selectedServices,
this.boundsRelationship.toLowerCase(), this.bbox?.westBoundLongitude, this.bbox?.eastBoundLongitude,
this.bbox?.southBoundLatitude, this.bbox?.northBoundLatitude).subscribe(searchResponse => {
this.boundsRelationship.toLowerCase(), westBounds, eastBounds,
southBounds, northBounds).subscribe(searchResponse => {

this.searchResults = [];
this.totalSearchHits = searchResponse.totalCSWRecordHits;
Expand Down
Loading