0

When we load a WMS service in our Leaflet maps, we encountered tiles that do not show.

You can see this happening on the following Plunker if you zoom in and pan to the left or right.

http://plnkr.co/edit/jPkeP6

I am very interested in finding out where the error lies here. Is it a problem with this specific WMS service or Leaflet?

Note: The WMS Service works in ESRI ArcMap, although it is a bit slow.

1 Answer 1

1

Your "missing tiles" are really errors from the server. Normally, when you ask a WMS server for an image, it will reply with an image. But sometimes, if you hit the kartverket servers a tiny bit too quickly, a tiny bit too hard (as you're doing when panning the map too fast), the server will reply with:

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?>
<ServiceExceptionReport version="1.1.0">
<ServiceException>
[99][Interceptor]
Overforbruk p. kort tid.
Vent litt, pr.v igjen.
(1)
</ServiceException>
</ServiceExceptionReport>

Right now I'm not aware of any way of making Leaflet retry failed tiles consistently.

I see several ways of working around this:

  • Setting a http://mapproxy.org/ instance and proxy all tiles through your own server
  • Making a leaflet plugin to retry failed WMS tiles
  • Stop hitting the kartverket WMS servers and hit their tile servers instead, by using the L.TileLayer.Kartverket) plugin
  • Contacting kartverket and ask nicely for higher limits in the WMS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.