@igo2/geo 19.0.0-next.8 → 19.0.0-next.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21221,15 +21221,7 @@ class OptionsApiService extends OptionsService {
21221
21221
  const request = this.http.get(this.urlApi, {
21222
21222
  params
21223
21223
  });
21224
- return request.pipe(map((res) => {
21225
- if (!res || !res.sourceOptions) {
21226
- return {};
21227
- }
21228
- if (res.layerOptions) {
21229
- res.sourceOptions._layerOptionsFromSource = res.layerOptions;
21230
- }
21231
- return res.sourceOptions;
21232
- }));
21224
+ return request.pipe(map((res) => this.handleSourceOptions(res)));
21233
21225
  }
21234
21226
  getArcgisRestOptions(baseOptions, detailedContextUri) {
21235
21227
  if (!this.urlApi) {
@@ -21248,15 +21240,20 @@ class OptionsApiService extends OptionsService {
21248
21240
  const request = this.http.get(this.urlApi, {
21249
21241
  params
21250
21242
  });
21251
- return request.pipe(map((res) => {
21252
- if (!res || !res.sourceOptions) {
21253
- return {};
21254
- }
21255
- if (res.layerOptions) {
21256
- res.sourceOptions._layerOptionsFromSource = res.layerOptions;
21257
- }
21258
- return res.sourceOptions;
21259
- }));
21243
+ return request.pipe(map((res) => this.handleSourceOptions(res)));
21244
+ }
21245
+ handleSourceOptions(res) {
21246
+ if (!res || !res.sourceOptions) {
21247
+ return {};
21248
+ }
21249
+ if (res.layerOptions) {
21250
+ res.sourceOptions._layerOptionsFromSource = res.layerOptions;
21251
+ }
21252
+ else {
21253
+ const { sourceOptions: _1, layerOptions: _2, ...restOptions } = res;
21254
+ res.sourceOptions._layerOptionsFromSource = restOptions;
21255
+ }
21256
+ return res.sourceOptions;
21260
21257
  }
21261
21258
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionsApiService, deps: [{ token: i1.HttpClient }, { token: 'options' }], target: i0.ɵɵFactoryTarget.Injectable });
21262
21259
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: OptionsApiService, providedIn: 'root' });