Skip to content

Commit

Permalink
pass service.layerOptions to getLayerFromRecords, allows to load laye…
Browse files Browse the repository at this point in the history
…rs without vendorparams in a dashboard
  • Loading branch information
landryb committed Mar 21, 2023
1 parent 6735aea commit 4b09ed5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import API from '../../../api/catalog';
export const toLayer = (r, service) => ["tms", "wfs"].includes(service?.type) // for tms and wfs the layer is ready
? r
// the type wms is default (for csw and wms), wmts have to be passed. // TODO: improve and centralize more
: API[service?.type || 'wms'].getLayerFromRecord(r);
: API[service?.type || 'wms'].getLayerFromRecord(r, {service: service.layerOptions});

// checks for tms wmts in order to addSearch() to skip addSearch
export const addSearchObservable = (selected, service) => ["tms", "wmts"].includes(service?.type) ? Rx.Observable.of(toLayer(selected, service)) : addSearch(toLayer(selected, service));
Expand Down

0 comments on commit 4b09ed5

Please sign in to comment.