Adding a Web Mapping Service tile layer

Another type of tile layer that can be added to a Leaflet map is a Web Mapping Service (WMS) tile layer. WMS is a way to request and transfer map images over the Web through HTTP. It is an Open Geospatial Consortium (OGC) specification.

Tip

For detailed technical information on the WMS specification, see the OGC website: http://www.opengeospatial.org/standards/wms.

With an understanding of how to add tile layers, and having seen several examples, you may have noticed that none of the examples were of satellite imagery. The first WMS layer you will add to your map is the United States Geological Survey (USGS) Imagery Topo.

Like the L.tileLayer() function that we used previously, the L.tileLayer.wms() function ...

Get Leaflet.js Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.