Azure-Samples / Azure-Samples/azure-maps-image-exporter
How to add this to angular project with typescript
- Dominant language
- JavaScript
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
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);
});
}
```
Contributor guide
Research direction
Start with the Angular configuration entries for azure-maps-control/dist/atlas.min.js and src/assets/azure-maps-image-exporter.js, then trace exportMapImage and atlas.MapImageExporter.getImage(this.map). Run the app and verify why MapImageExporter is undefined; done means the call resolves and appends the exported image without the getImage error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, azure, javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100