Skip to content

How to add this to angular project with typescript #3

@patolax

Description

@patolax

I did the following

"styles": [ "node_modules/azure-maps-control/dist/atlas.min.css", "src/styles.scss" ], "scripts": [ "node_modules/azure-maps-control/dist/atlas.min.js", "src/assets/azure-maps-image-exporter.js" ]

But this is still throwing with _Cannot read properties of undefined (reading 'getImage')_

  exportMapImage(): void {
    (atlas as any).MapImageExporter.getImage(this.map).then((mapImg: HTMLImageElement) => {
      console.log('Map image exported successfully:', mapImg);
      document.body.appendChild(mapImg);
    }).catch((error: any) => {
      console.error('Error exporting map image:', error);
    });
  }

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