none
V8 Ordnance Survey tiles slow to load, and not caching RRS feed

  • Question

  • When setting the map type to Ordnance Survey, the loading time seems to be very slow, which is exacerbated when using a slow connection. I've been using the 'Fast 3G' setting under Network Throttling in Chrome, and it takes approximately 25 seconds to load the test map from the code below. A V7 equivalent map takes 17 seconds. Not a massive difference but on subsequent loads of the page the V7 map uses cached copies of the map tiles, whereas V8 seems to have to reload everything again.

    I don't know if this is a recent issue. I've been developing on a 100Mb connection so hadn't noticed any problems, but now I've migrated our maps from V7, website users with slower connections have started contacting me about being unable to use the maps. One user is getting an 'Uncaught (in promise) null' exception where I assume the system has just given up loading the maps.

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8" />
    	<script type="text/javascript" charset="utf-8" src="http://www.bing.com/api/maps/mapcontrol?callback=GetMap&branch=experimental" async defer></script>
    	<script type='text/javascript'>
    		var map;
    		function GetMap() {
    			var map = new Microsoft.Maps.Map('#myMap',
    			{ 	credentials: "Your Bing Maps Key",
    				center: new Microsoft.Maps.Location(54.8, -2.8),
    				zoom: 14,
    				mapTypeId: Microsoft.Maps.MapTypeId.ordnanceSurvey
    			});
    			map.entities.push(new Microsoft.Maps.Pushpin(map.getCenter()));
    		}
        </script>
    	<style>body {margin:0}</style>
    </head>
    <body>
    	<div id="myMap" style="width:100vw;height:100vh"></div>
    </body>
    </html>


    Tuesday, September 19, 2017 9:10 AM

Answers

  • I've taken a quick look into this. One thing you can do for a slight improvement is to put the map into liteMode, this modifies how the map handles rendering to make it a but more like V7 but disables things like vector map labels. To do this, add liteMode: true to the map options when loading the map. I'll have the team look into the caching.

    [Blog] [twitter] [LinkedIn]

    • Proposed as answer by Ricky_Brundritt Wednesday, September 20, 2017 6:06 PM
    • Marked as answer by gwenci Friday, September 22, 2017 9:16 AM
    Wednesday, September 20, 2017 6:06 PM

All replies

  • I've checked with the user receiving the 'Uncaught (in promise)' exception and they have a frankly ridiculous connection speed of 0.36Mb, so I'm not surprised they're having problems. If the caching issue were to be resolved this would help things a bit though.
    Tuesday, September 19, 2017 10:01 AM
  • I've taken a quick look into this. One thing you can do for a slight improvement is to put the map into liteMode, this modifies how the map handles rendering to make it a but more like V7 but disables things like vector map labels. To do this, add liteMode: true to the map options when loading the map. I'll have the team look into the caching.

    [Blog] [twitter] [LinkedIn]

    • Proposed as answer by Ricky_Brundritt Wednesday, September 20, 2017 6:06 PM
    • Marked as answer by gwenci Friday, September 22, 2017 9:16 AM
    Wednesday, September 20, 2017 6:06 PM