DEV Community

Cover image for Svelte + Vite Web Mapping App in 3 Steps
Gavin Rehkemper
Gavin Rehkemper

Posted on

Svelte + Vite Web Mapping App in 3 Steps

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:

  1. 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
    
  2. Then install the dependencies and run:

    cd esri-svelte-project
    npm install
    npm install @arcgis/core --save-dev
    npm run dev
    
  3. Copy contents of App.svelte in this repository into your App.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.

More Info

Discussion (0)