Skip to content

Commit

Permalink
feat(datasource): retrieve options from api (#583)
Browse files Browse the repository at this point in the history
* in progress

* in progress

* in progress

* infoFormat

* remove console.log

* Update options-api.service.ts

* max resolutions null

* keep query params concept

* convert scaleDenom to resolution

* fix imports

* add providers

* fix options api error
  • Loading branch information
mbarbeau committed May 11, 2020
1 parent 1278cef commit e943f86
Show file tree
Hide file tree
Showing 20 changed files with 370 additions and 268 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ export class CatalogBrowserLayerComponent implements OnInit {
}

isInResolutionsRange(): boolean {
const minResolution = this.layer.options.minResolution;
const maxResolution = this.layer.options.maxResolution;
const minResolution = this.layer.options.minResolution || 0;
const maxResolution = this.layer.options.maxResolution || Infinity;
this.inRange$.next(
this.resolution >= minResolution && this.resolution <= maxResolution
);
Expand Down
6 changes: 1 addition & 5 deletions packages/geo/src/lib/catalog/shared/catalog.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { EntityState } from '@igo2/common';

import { MetadataLayerOptions } from './../../metadata/shared/metadata.interface';
import { TooltipType } from '../../layer';
import { TimeFilterOptions } from '../../filter';
import { QueryFormat, QueryHtmlTarget } from '../../query';
import { QueryFormat } from '../../query';

import { CatalogItemType, TypeCatalogStrings } from './catalog.enum';

Expand All @@ -18,12 +17,9 @@ export interface ICatalog {
requestEncoding?: string;
regFilters?: string[];
groupImpose?: CatalogItemGroup; // only use by ICompositeCatalog object (id and title)
timeFilter?: TimeFilterOptions;
queryFormat?: QueryFormat;
queryHtmlTarget?: QueryHtmlTarget;
queryParams?: { [key: string]: string };
sourceOptions?: { [key: string]: any };
count?: number;
tooltipType?: TooltipType.ABSTRACT | TooltipType.TITLE;
sortDirection?: 'asc' | 'desc';
setCrossOriginAnonymous?: boolean;
Expand Down
Loading

0 comments on commit e943f86

Please sign in to comment.