I will assume that you are using the 4.x version of the API since it seems GeoJSONLayer
was implemented in 4.11.
Remember that you have to define the modules and classes you will use on top of your script. I see you are calling several modules and classes but GeoJsonLayer
is not listed (hence the error you are getting). If you take a look at the documentation, you will see that you need to integrate the following piece of code:
require(["esri/layers/GeoJSONLayer"], function(GeoJSONLayer) { /* code goes here */ });
Also, note that it is GeoJSONLayer
and not GeoJsonLayer
(althought you could name it anything you wantedwant inside function()
).