Visualizing GeoJson data on a map requires two steps:

  1. Create a FeatureModel by creating a Store for the GeoJSON data.

  2. Use a FeatureLayer to visualize the model.

//Create a Store with a GeoJson codec to decode the data
const store = new UrlStore({
  target: url,
  codec: new GeoJsonCodec()

//Use the store to create a model
const model = new FeatureModel(store);

//Create a layer for the model
const layer = new FeatureLayer(model);

//Add the layer to the map