Skip to content

Commit

Permalink
Merge pull request #433 from stuartwoodman/AUS-4221-Restrict-Spatial-…
Browse files Browse the repository at this point in the history
…Bounds

AUS-4221 Restrict Spatial Bounds
  • Loading branch information
vjf authored Aug 23, 2024
2 parents 86ec365 + 015f8f1 commit a391634
Showing 1 changed file with 13 additions and 3 deletions.
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

0 comments on commit a391634

Please sign in to comment.