I tried to install the new version 3.x
azure-maps-control npm package but it seems to have some problems with Typescript:
- It refers to an
azuremaps-maplibre-gl
module which cannot be found anywhere. Normalmaplibre-gl
exists but I suppose that the Azure Maps team made some changes to the vanilla version. This dependency seems to be introduced in version3.0.0-preview.9
.
Errors in azure-maps-control/typings/index.d.ts
:
- line 674:23 - error TS2300: Duplicate identifier 'options'. (also defined on line 671:23)
- line 674:23 - error TS2717: Subsequent property declarations must have the same type. Property 'options' must be of type 'boolean', but here has type 'PitchControlOptions'.
- line 2135:51 - error TS2304: Cannot find name 'ElevationTileSource'.
- line 4097:49 - error TS1246: An interface property cannot have an initializer.
- line 4101:44 - error TS1246: An interface property cannot have an initializer.
- line 4105:70 - error TS1246: An interface property cannot have an initializer.
- line 4109:24 - error TS1246: An interface property cannot have an initializer.
Is this an oversight by the Azure Maps team? Or do I use the package wrong?
EDIT for people reading this in the future: Package versions starting from 3.0.2
are fixed.
There is a known bug in the current NPM package release. The Azure Maps team is looking into this. There is a thread tracking this here: https://github.com/Azure-Samples/AzureMapsCodeSamples/issues/116