You help is greatly appreciated. I am trying to load sample school data as a geojson feature collection from dotnet core 3.1 MVC rest api. And of course create GeoJSONLayer. I was able to it on leaflet. But not able to do it in Esri javascript 4.15 api.
I was able to extract the data from MVC controller and lint correctly.
client side code :
const url = "https://localhost:44332/Map/schools";
const geojsonLayer = new GeoJSONLayer({
url: url
popupTemplate: schoolTemplate(),
renderer: myRenderer()
});
map = new Map({
basemap: "gray",
layers: [geojsonLayer]
});
server side code :
var result = await _dbContext.Schools.Where(s => s.countyid == 24).ToListAsync();
Feature f = null;