Skip to content

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

License

Notifications You must be signed in to change notification settings

gavinr-maps/esri-svelte-example

Repository files navigation

Esri Svelte Example

GitHub package.json dependency version (dev dep on branch)

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.

Links

Need Calcite or a url router?

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