esri-svelte-example

Esri Svelte Example

An example web application that shows how to use the ArcGIS API for JavaScript with Svelte

Esri Svelte Example

An example Svelte application that shows how use the ArcGIS API for JavaScript to load a map.

View the live app here.

Get Started

To get started, follow these instructions.

  1. Run the Vite init workflow choosing the Svelte (or Svelte TypeScript) template:

    npm init vite@latest
    
  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.

    1. Note: This App.svelte is not using TypeScript, so you must add back the lang="ts" line to the <script> tag if you're using the TypeScript template.

Need Calcite or a url router?

A more advanced list of steps is listed in the wiki.

Top categories

Loading Svelte Themes