This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

Tiles slow to reload when reloading tab for Leaflet project in Firefox

0

I'm unsure this is a direct Leaflet problem, but hope some can help.

I'm developing a webpage. The file are stored on my local drive. I click on the .html file & it loads into Firefox & displays in the expected amount of time. When I amend the html file I reload the Firefox tab by right clicking on it. The tiles (http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png) take seconds, even minutes to load. There's a message in the bottom left Transferring data form (a or b.or c).tile.openstreemap.org.

This occurred using different versions of leaflet & Firefox over many months. It doesn't occur in IE 11.

I've tried other tilelayer (https://{s}.tile.openstreetmap.se/hydda/full/{z}/{x}/{y}.png) & it works fine. There are no delays on the main OSM site when zooming/panning.

Base Code I used (badly formatted by this help site)

<head> <title>Base 1_34</title> <meta charset="utf-8"/> <link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css"/> <script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js"></script> <style> body {padding: 0;margin: 0;} html, body, #map {height: 100%;width: 100%;} </style> </head> <body>

<script> var osm = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {opacity: 0.7}); var map = new L.Map('map').addLayer(osm).setView(new L.LatLng(51.4769,0.0), 13.5); </script> </body>

asked 30 Aug '18, 15:00

DaveF's gravatar image

DaveF
3.3k8498133
accept rate: 16%

edited 30 Aug '18, 15:06