Skip to content

Commit

Permalink
fix(arcgisREST): fix forced title and legend for arcgis layer (#819)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeLafreniere18 committed Mar 9, 2021
1 parent 9c2826d commit abdd881
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/geo/src/lib/catalog/shared/catalog.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,6 @@ export class CatalogService {
baseSourceOptions,
catalog.sourceOptions
) as ArcGISRestDataSourceOptions;

return ObjectUtils.removeUndefined({
id: generateIdFromSourceOptions(sourceOptions),
type: CatalogItemType.Layer,
Expand All @@ -630,7 +629,8 @@ export class CatalogService {
extern: undefined,
abstract,
type: baseSourceOptions.type
}
},
title: forcedTitle !== undefined ? forcedTitle : layer.name
}
});
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ export interface ArcGISRestImageDataSourceOptions extends DataSourceOptions {
url?: string;
ol?: ImageArcGISRest;
idColumn?: string;
options?: any;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export class ImageArcGISRestDataSource extends DataSource {
}

getLegend(): Legend[] {
const legendInfo = this.options.params.legendInfo;
let legendInfo;
this.params ? legendInfo = this.options.params.legendInfo : legendInfo = this.options.options.legendInfo;
const legend = super.getLegend();
if (legendInfo === undefined || legend.length > 0) {
return legend;
Expand Down

0 comments on commit abdd881

Please sign in to comment.