Skip to content

Latest commit

 

History

History
110 lines (65 loc) · 7.9 KB

archived-examples.md

File metadata and controls

110 lines (65 loc) · 7.9 KB

3.x Types

You can use these instructions in the Legacy samples for ArcGIS Maps SDK for JavaScript Resources to install the 3.x types. Follow the instructions outlined in the /3.x/typescript directory.

Use import * as esri from 'esri'; to implement the types as shown here.

// define a type that is an array of the 3.x types you are using
// and indicate that loadModules() will resolve with that type
type MapModules = [typeof import("esri/map"), typeof import("esri/geometry/Extent")];
const [Map, Extent] = await (loadModules(["esri/map", "esri/geometry/Extent"]) as Promise<MapModules>);
// the returned objects now have type
let map = new Map("viewDiv"...

A more complete 3.x sample can be seen here.

4.x Types

A more complete 4.x sample can be seen here.

Legacy browsers

Since this library also works with v3.x of the ArcGIS Maps SDK, the community has made some effort to get it to work with some of the older browsers supported by 3.x like IE < 11.

Legacy examples

Here is an archive of some applications and framework-specific wrapper libraries that use this library. Most of these examples haven't been updated in a long time, so check the version of esri-loader and their commit history before using them as a reference. They are presented by framework in alphabetical order - not picking any favorites here 😜:

Reusable libraries for Angular

Example Angular applications

  • can-arcgis - CanJS configurable mapping app (inspired by cmv-app) and components built for the ArcGIS Maps SDK for JavaScript 4.x, bundled with StealJS
  • esri-choo-example - An example Choo application that shows how to use esri-loader to create a custom map view.
  • dojo-esri-loader - Dojo 5 app with esri-loader (blog post)

  • esri-dojo - An example of how to use Esri Loader with Dojo 2+. This example is a simple map that allows you to place markers on it.

  • ng-cli-electron-esri - This project is meant to demonstrate how to run a mapping application using the ArcGIS Maps SDK for JavaScript inside of Electron

Reusable libraries for Ember

Example Ember applications

See the examples over at ember-esri-loader

  • esri-hyperapp-example - An example Hyperapp application that shows how to use esri-loader to create a custom map view and component.
  • esri-preact-pwa - An example progressive web app (PWA) using the ArcGIS Maps SDK for JavaScript built with Preact

Reusable libraries for React

Example React applications

  • esri-riot-example - An example Riot application that shows how to use esri-loader to create a custom <esri-map-view> component.
  • esri-stencil-example - An example Stencil application that shows how to use esri-loader to create a custom map view component and implement some basic routing controlling the map state
  • esri-svelte-example - An example Svelte application that shows how to use esri-loader to load a map.
  • esri-svelte-basemaps-example - An example Svelte application that shows how to use esri-loader to create a custom <EsriMapView> component and explore various basemaps.