- Notifications
You must be signed in to change notification settings - Fork43
Your organizations maps app built with ArcGIS API for Javascript
License
Esri/maps-app-javascript
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repo provides an example app calledMaps App that can be used as as starter for your organizations mapping app built withArcGIS API 4 for JavaScript. You can use the Maps App as is, or extend it using the ArcGIS API for JavaScript.
- Dynamically switch basemaps
- Place search
- Directions
- Sign into an ArcGIS account
- Service Worker
- AppCache
manifest.json- to add as button to home screen- default icons
This application takes advantage of numerous technologies for development purposes. It utlizeswebpack to compile and bundle the application code and other files. It is written inTypeScript and provides examples on how to createcustom widgets using theArcGIS API 4 for JavaScript.
This application also usesWorkbox for Webpack to set upservice workers for the application to cache application code and files, as well as uses anappcache 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!
Read thedocs 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.
Clone the repo and runnpm install.
NOTE FOR WINDOWS USERS - You will need to install theWindows-Build-Tools to compile npm modules for this project.
npm install --global --production windows-build-toolsnpm start- compile application and run it in a local server athttp://localhost:8080/.npm run build- compile application for deployment.npm test- run unit tests with local chrome driver.npm run serve- Run a production build of the application, but serve it up locally to see how the built app will behave.
Usenpm run serve to full test that Service Workers are working correctly withwebpack-dev-server self signed certifcates. Refer tothis article on how to run Chrome with proper flags enabled for development purposes.
Login toArcGIS for Developers andregister your app to create an Client ID.
You will need to register your application with a Client ID so that you can take advantage of the premiumDirections and Routing andGeocoding Services from the ArcGIS Platform.
- Once you've registered your version of the maps-app, grab a copy of the client id from the registration and set the client id in the applications
src/app/config.tsfile. You will also want to provide the Portal URL for your Organization, such as"https://<MY-ORGANIZATION>.maps.arcgis.com". You can also provide your own WebMap or use the default one provided.
// src/app/config.ts/** * Registered application id. * This is needed to be able to use premium * services such as routing and directions. */exportconstappId="<APP-ID>";/** * Users Portal URL. */exportconstportalUrl="https://arcgis.com";// default Portal URL/** * WebMap id to use for this application. * You can update this WebMap id with your own. */exportconstwebMapItem={portalItem:{// shared WebMap with Vector Tile basemapid:"1aab2defd7444b6790f439a186cd4a23"}};
- As part of the registration process, add a redirect uri for your app. Navigate to the Redirect URIs section at the bottom of the registration page and set the redirect uri as shown for development purposes. You will also want to add a redirect uri for where your application will be deployed. This redirect uri is the default redirect for
https://www.arcgis.com.
For development purposes, you will want to add the following redirects to your Application ID:
http://127.0.0.1:8080
When you deploy your application, do not use the same Application ID for development as production. You want your Application ID toonly redirect to your production website.
Find a bug or want to request a new feature enhancement? Let us know by submitting an issue.
Anyone and everyone is welcome tocontribute. We do accept pull requests.
- Get involved
- Report issues
- Contribute code
- Improve documentation
Generating table of contents for documents in this repository was performed using theMDTOC package for Atom.
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'sLICENSE file
About
Your organizations maps app built with ArcGIS API for Javascript
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.


