Make bbox optional
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

This commit is contained in:
Willem Dantuma 2019-11-18 09:42:05 +01:00
parent 5d79dcc7b6
commit 16db063339

View File

@ -92,8 +92,10 @@ export class ItemService {
getItemFeatures(code: string, extent: number[], crs: string, layerIndex?:number): Observable<any> {
var params = new HttpParams();
params = params.append("bbox", extent.join(","));
params = params.append("crs", crs);
if(extent != null) {
params = params.append("bbox", extent.join(","));
}
if(layerIndex!=null)
return this.httpClient.get<any>(`${this.ApiEndpoint()}/api/v1/items/${code}/features/layer/${layerIndex}`, { params: params });
else