An example Svelte application that shows how use the ArcGIS API for JavaScript to load a map.
To get started, follow these instructions.
-
Run the Vite init workflow choosing the Svelte (or Svelte TypeScript) template:
npm init vite@latest
-
Then install the dependencies and run:
cd esri-svelte-project npm install npm install @arcgis/core --save-dev npm run dev
-
Copy contents of
App.svelte
in this repository into yourApp.svelte
.- Note: This
App.svelte
is not using TypeScript, so you must add back thelang="ts"
line to the<script>
tag if you're using the TypeScript template.
- Note: This
A more advanced list of steps is listed in the wiki.