Uncaught ReferenceError: GeoJsonLayer is not defined
I am thinking that I am just using a bad filepath/url in my boundaries
variable. Any suggestions on how to get this simple json file added as a layer or how to resolve this error?
I am thinking that I am just using a bad filepath/url in my boundaries
variable. Any suggestions on how to get this simple json file added as a layer or how to resolve this error?
require([
"esri/map",
"esri/basemaps",
"esri/dijit/BasemapToggle",
"esri/layers/ArcGISDynamicMapServiceLayer",
"esri/tasks/ImageServiceIdentifyTask",
"esri/tasks/ImageServiceIdentifyParameters",
"esri/layers/WebTiledLayer",
"esri/dijit/Search",
"esri/config",
"esri/request",
"esri/tasks/IdentifyTask",
"esri/tasks/IdentifyParameters",
"esri/tasks/query",
"esri/tasks/QueryTask",
"dojo/json",
"dojo/promise/all",
"dojo/domReady!"], function(
Map,
esriBasemaps,
BasemapToggle,
ArcGISDynamicMapServiceLayer,
ImageServiceIdentifyTask,
ImageServiceIdentifyParameters,
WebTiledLayer,
Search,
esriConfig,
esriRequest,
IdentifyTask,
IdentifyParameters,
Query,
QueryTask,
JSON,
all) {
...
var boundaries = "./region2_boundary.json";
var geoJsonLayer1 = new GeoJsonLayer({
data: boundaries
});
...
map = new esri.Map("map", {
//basemap: "streets",
basemap: "topo",
center: [-66.664513,18.200178], //PR
zoom: 9,
layers: [geoJsonLayer1]
});
EDIT I have added my dependencies above.