Book Image

Leaflet.js Essentials

Book Image

Leaflet.js Essentials

Overview of this book

Table of Contents (13 chapters)
Leaflet.js Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

ESRI basemaps


ESRI provides eight different basemaps that you can use in your Leaflet map. The eight layers are the following:

  • Streets

  • Topographic

  • National Geographic

  • Oceans

  • Gray

  • Dark gray

  • Imagery

  • Shaded relief

In addition to the eight basemaps, there are six basemap label layers, OceansLabels, GrayLabels, DarkGrayLabels, ImageryLabels, ImageryTransportation, and ShadedReliefLabels, to compliment the basemaps. If that is not enough, there is also a retina version of each basemap.

To use an ESRI basemap, follow these steps:

  1. First, add a reference to the ESRI-leaflet file. It is in beta, but that doesn't mean that it is not fully functional:

    <script src="http://cdn-geoweb.s3.amazonaws.com/esri- leaflet/0.0.1-beta.5/esri-Leaflet"></script>

    Note

    On its GitHub repository, ESRI states that the library is on track to be moved from beta to production in 2014. You can find more information and download the additional files at https://github.com/Esri/esri-leaflet/.

  2. Next, create an ESRI basemap layer...