A small Next.js starter showing an ArcGIS map/scene using @arcgis/core.
- Demonstrates loading
@arcgis/coredynamically in a Next.js client component. - Includes a fallback for
WebMapandWebScene, and a local 3D scene focused on Singapore.
- Node.js 18+ and npm
npm installnpm run dev
# open http://localhost:3000npm run build
npm run start- The project uses
@arcgis/core@^4.34.8and loads the matching CSS from the ArcGIS CDN. - If you want the local 3D scene disabled, edit
components/MapContainer.tsxand setuseLocalScenetofalse. - To change the portal item used as a fallback, update the
portalItemIdvariable incomponents/MapContainer.tsx.
- If you see a 502 when accessing the app in a remote editor preview, confirm the Next dev server is running and reachable (port 3000).
- For ArcGIS runtime errors, check the browser console for messages about
Web MapvsWeb Sceneand use the fallback logic inMapContainer.tsx.
MIT