Skip to content

A sample app that uses Ionic Capacitor and Esri Leaflet to create and display a map with ArcGIS vector basemap layers.

Notifications You must be signed in to change notification settings

cyatteau/capacitor-esri-leaflet-app

Repository files navigation

Capacitor Esri Leaflet App

Description

This is a sample mobile application that shows how to load ArcGIS Vector basemap layers with Esri Leaflet and Capacitor.

image

Visuals: The Different Vector Basemap Layers

ArcGIS Streets
ArcGIS Navigation
ArcGIS Topographic
ArcGIS Light Gray
ArcGIS Dark Gray
ArcGIS Imagery
ArcGIS Charted Territory
ArcGIS Colored Pencil
ArcGIS Nova
ArcGIS Midcentury
OSM Standard
OSM Streets

Required Dependencies

  • 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.

Other Requirements

Available Scripts

In the project directory, you can run:

npm start

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.

npx cap init

Initializes Capacitor in your app.

npx cap add ios

Adds native iOS platform.

npx cap add android

Adds native Android platform.

npm run build

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!

npx cap sync

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).

npx cap open android

Opens the app in Android Studio. Simply wait until everything loads and deploy your app to a connected (virtual or physical device).

npx cap open ios

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.

About

A sample app that uses Ionic Capacitor and Esri Leaflet to create and display a map with ArcGIS vector basemap layers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published