Home

Awesome

code style: prettier

Maps App JavaScipt

This repo provides an example app called Maps App that can be used as as starter for your organizations mapping app built with ArcGIS API 4 for JavaScript. You can use the Maps App as is, or extend it using the ArcGIS API for JavaScript.

<!-- MDTOC maxdepth:6 firsth1:0 numbering:0 flatten:0 bullets:1 updateOnSave:1 --> <!-- /MDTOC -->

Features

This application takes advantage of numerous technologies for development purposes. It utlizes webpack to compile and bundle the application code and other files. It is written in TypeScript and provides examples on how to create custom widgets using the ArcGIS API 4 for JavaScript.

This application also uses Workbox for Webpack to set up service workers for the application to cache application code and files, as well as uses an appcache fallback for Internet Explorer, Edge, and Safari.

Intern is used for all unit tests and code coverage.

Feel free to use this project as a starting point for your own applications!

Detailed Documentation

Read the docs for a detailed explanation of the application, including its architecture and how it leverages the ArcGIS platform, as well as how you can begin using the app right away.

Usage

Clone the repo and run npm install.

Use npm run serve to full test that Service Workers are working correctly with webpack-dev-server self signed certifcates. Refer to this article on how to run Chrome with proper flags enabled for development purposes.

// src/app/config.ts
/**
 * Registered application id.
 * This is needed to be able to use premium
 * services such as routing and directions.
 */
export const appId = "<APP-ID>";

/**
 * Users Portal URL.
 */
export const portalUrl = "https://arcgis.com"; // default Portal URL

/**
 * WebMap id to use for this application.
 * You can update this WebMap id with your own.
 */
export const webMapItem = {
  portalItem: {
    // shared WebMap with Vector Tile basemap
    id: "1aab2defd7444b6790f439a186cd4a23"
  }
};

For development purposes, you will want to add the following redirects to your Application ID:

When you deploy your application, do not use the same Application ID for development as production. You want your Application ID to only redirect to your production website.

Demo

application

Issues

Find a bug or want to request a new feature enhancement? Let us know by submitting an issue.

Contributing

Anyone and everyone is welcome to contribute. We do accept pull requests.

  1. Get involved
  2. Report issues
  3. Contribute code
  4. Improve documentation

MDTOC

Generating table of contents for documents in this repository was performed using the MDTOC package for Atom.

Licensing

Copyright 2018 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's LICENSE file