I am new to Javascript and working with the ArcGIS for Javascript API. I recently completed an abbreviated version of the Developing Web Apps with ArcGIS, API for Javascript course and I am going back through the lesson for review. I am trying to set the initial extent in a lesson and it is not working. I don't know what I am doing wrong. Any help would be greatly appreciated.
Thanks in advance.
Ed Dean
Solved! Go to Solution.
// Create the map mapMain = new Map("cpCenter", { basemap: "satellite", extent: "extentInitial" });
you are passing the variable as string. you need it as below
// Create the map mapMain = new Map("cpCenter", { basemap: "satellite", extent: extentInitial });
// Create the map mapMain = new Map("cpCenter", { basemap: "satellite", extent: "extentInitial" });
you are passing the variable as string. you need it as below
// Create the map mapMain = new Map("cpCenter", { basemap: "satellite", extent: extentInitial });
Thank you very much! This worked