esri-choo-example

October 3, 2018 ยท View on GitHub

An example Choo application that shows how to use esri-loader to create a custom map view.

This approach demonstrates how to build a Choo-focused application with the ArcGIS API for JavaScript. Using esri-loader makes the whole development process straightforward and enjoyable.

This project was originally started and scaffolded out with the help of create-choo-app (v1.11). Then esri-loader was added as an additional project dependency, which allows us to glue together an instance of an ArcGIS API MapView inside of a Choo application view.

TODO: Maybe use nanocomponent in the /esri-map-view Choo route to allow us to properly wait until the component is mounted on the DOM by hooking into Nanocomponent.prototype.load(el).

PROOF:

screenshot

Routes

RouteFileDescription
/views/main.jsThe main view
/esri-map-viewviews/esri-map-view.jsDisplay an Esri MapView with the help of esri-loader
/*views/404.jsDisplay unhandled routes

Commands

CommandDescription
$ npm startStart the development server
$ npm testLint, validate deps & run tests
$ npm run buildCompile all files into dist/
$ npm run createGenerate a scaffold file
$ npm run inspectInspect the bundle's dependencies