Skip to content

Commit

Permalink
resolved PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ronitjadhav committed Jan 23, 2024
1 parent e380dde commit d19b555
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export class AddLayerFromWfsComponent implements OnInit {
name: layer.name,
url: this.wfsUrl.toString(),
type: MapContextLayerTypeEnum.WFS,
featureCount: 10000,
}
this.mapFacade.addLayer({ ...layerToAdd, title: layer.title })
}
Expand Down
1 change: 0 additions & 1 deletion libs/feature/map/src/lib/map-context/map-context.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ interface MapContextLayerWfsModel {
type: 'wfs'
url: string
name: string
featureCount?: number
}

interface LayerXyzModel {
Expand Down
12 changes: 6 additions & 6 deletions libs/feature/map/src/lib/map-context/map-context.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export const DEFAULT_VIEW: MapContextViewModel = {
zoom: 2,
}

export const WFS_MAX_FEATURES = 10000

@Injectable({
providedIn: 'root',
})
Expand Down Expand Up @@ -111,12 +113,10 @@ export class MapContextService {
urlObj.searchParams.set('typename', layerModel.name)
urlObj.searchParams.set('srsname', 'EPSG:3857')
urlObj.searchParams.set('bbox', `${extent.join(',')},EPSG:3857`)
if ('featureCount' in layerModel && layerModel.featureCount) {
urlObj.searchParams.set(
'maxFeatures',
layerModel.featureCount.toString()
)
}
urlObj.searchParams.set(
'maxFeatures',
WFS_MAX_FEATURES.toString()
)
return urlObj.toString()
},
strategy: bboxStrategy,
Expand Down

0 comments on commit d19b555

Please sign in to comment.