Skip to content

AcMapLayerProviderComponent options input only accept url #418

@bentfc

Description

@bentfc

In the last version of code, the class "AcMapLayerProviderComponent":

@Component({
  selector: 'ac-map-layer-provider',
  template: '',
})
export class AcMapLayerProviderComponent implements OnInit, OnChanges, OnDestroy {

  /**
   * refer to cesium docs for details https://cesiumjs.org/Cesium/Build/Documentation/ImageryProvider.html
   */
  @Input()
  options: { url?: string } = {};

  ...

should become something like that:

@Component({
  selector: 'ac-map-layer-provider',
  template: '',
})
export class AcMapLayerProviderComponent implements OnInit, OnChanges, OnDestroy {

  /**
   * refer to cesium docs for details https://cesiumjs.org/Cesium/Build/Documentation/ImageryProvider.html
   */
  @Input()
  options: { url?: string, [key:string]: any } = {};

  ...

Declaring options like that allows to add whatever field needed for the chosen provider. Most of them are using much more than just a url.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions