Using the ArcGIS API for JavaScript
Getting started building a web mapping app is quick and easy with Svelte and Vite. Here are the steps:
-
Run the Vite init workflow choosing the Svelte template:
npm init vite@latest esri-svelte-project --template svelte
or if you prefer TypeScript:
npm init vite@latest esri-svelte-project --template svelte-ts
-
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
.
The result is a simple, interactive map on the page like this, but you can do a lot more. For example, a full page emergency call mapping application.
Top comments (0)