Am I right to assume that the Azure Maps Control package uses its own type definitions for FeatureCollection
, Feature
etc. instead of the @types/geojson
ones (by looking at the type definitions of the npm package)?
I'm currently also using turf.js
within my Azure Maps project and I constantly need to convert my geojson types between each other (from the Azure Maps ones to the Turf.js
ones), even though most data within the Azure Maps package can be transformed to geojson types.
I can easily convert between these types, but it would be easier if the Azure Maps Control package would use the @types/geojson
itself. Or is the conversion always needed, even if the Azure Maps package would use these geojson types?
I believe it does have its own interfaces for GeoJSON, note that @types/geojson didn't exist when Azure Maps was first created. Azure Maps Web SDK also extends the geojson objects. That said, the base interfaces are the same and there is no reason why it shouldn't play nicely with @types/geojson since they represent that exact same data object. No conversion beyond a simple cast or a simple //@ts-ignore
comment should be needed.