You are looking at the minimized code (transpiled to be smaller). It is esm type import module. In the dist folder you can see the friendly code atlas.js. They don’t appear to have supplied the .map files which would map to the source file.
Unknown error in stack trace from azure-maps-control package
The company I work at uses the Servoy IDE to create their main product. One of the sub-projects within the company is a stock visualization application which uses the Azure Maps JS SDK under the hood.
This works great, however it causes problems within the Servoy IDE. When using the Servoy IDE, it is possible to create forms using a visual editor. Since the introduction of the azure-maps-control
package, this visual editor is broken, which has never happened before.
Servoy support looked at our project and pointed out that the Azure Maps package is causing the problem. They saw an error in the stack trace. Indeed, when removing the package from package.json
, the problem disappears. However, even if the package is installed, it only breaks when the package is imported and used inside code (the code doesn't have to run), which seems to point in the direction of the package executing some code when being imported (just a guess)? When looking at the stack trace, we see the following error:
ERROR Error: Invalid arguments; object member 'request' is required and must have type string at atlas-esm.min.js:42707:60
When looking at the code in the Chrome dev tools, it points to line 92010
in atlas-esm.js
(or line 92016
in atlas.js
):
var allowedAttributionAttributes = __spreadArray$8(['href'], __read$a(attributionRuleAttributes), false);
I do not know what this code does, and I couldn't figure it out. Any clues to what this problem might be?
Do note that this error only occurs inside the Servoy IDE (when opening the visual forms editor), not when executing the application itself. Is it possible that the package tries to execute some code and can't succeed due to the secure environment of the IDE?
I run the latest version of azure-maps-control, but as far as I know, I had the same problem with each version before this.