Search code examples
javascriptleafletopenlayersmapboxwms

Why are WMS (Web Map Service) requests coming back in tiles?


After reading about the WMS and WMTS protocols for serving map tiles I am slightly confused. If you visit https://openlayers.org/en/latest/examples/wms-image.html it gives you an example of WMS served mapping images. If you open up the developer console, inspect the network traffic and zoom in I see image responses coming back in tiles. I've also tried this using LeafletJS hooked up to a WMS server and see tiled responses as well.

From my understanding the WMS protocol pre-renders a single image based on your map extent but this is not what I am seeing. I would expect 1 single image response.


Solution

  • In the example you linked, the tiles you are seeing are from OpenStreetMap. The overlay, the states of the USA, are from a WMS, and are requested as single image.