How do you add a GeoJSON file into Azure Maps Typescript?

Ryan Choe 1 Reputation point

I am trying to add a local GeoJSON file into my Azure Maps (Angular) and cannot add the file as a datasource due to Argument of type '{}' is not assignable to parameter of type 'FeatureCollection | Geometry | Feature<Geometry, any> | GeometryCollection | Shape | (Geometry | Feature<...> | Shape)[]'. Type '{}' is missing the following properties from type '(Geometry | Feature<Geometry, any> | Shape)[]': length, pop, push, concat, and 26 more.

How can I add the GeoJSON object as a new datasource?

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
607 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. IoTGirl 2,976 Reputation points Microsoft Employee

    I am afraid I can't be much help with Angular, but Azure Maps supports GeoJSON in the Web SDK as documented here:

    1 person found this answer helpful.
    0 comments No comments