This is a sample mobile application that shows how to load ArcGIS Vector basemap layers with Esri Leaflet and Capacitor.
npm install leaflet
. Find API Reference info here.npm install @capacitor/cli
. Installs the Capacitor CLI.npm install @capacitor/core @capacitor/ios @capacitor/android
. Installs required mobile packages.
- Sign up for an ArcGIS Developer Account
- Get an API Key. Find video instructions here.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
Initializes Capacitor in your app.
Adds native iOS platform.
Adds native Android platform.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
Syncs all the web code into the correct places of the native platforms so the app can be properly displayed. Additionally, it updates the native platforms and installs plugins to access native functionality like camera (when necessary).
Opens the app in Android Studio. Simply wait until everything loads and deploy your app to a connected (virtual or physical device).
Opens the app in Xcode. Be sure to setup an account if you want to deploy your app to a physical device; otherwise running virtually happens automatically.