加快Bing Maps在移动设备上的加载时间? [英] Speeding up load time for Bing Maps on mobile devices?

查看:51
本文介绍了加快Bing Maps在移动设备上的加载时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我想知道是否有任何资源或最佳做法为移动设备准备Bing地图。对于我的地图,我使用了几个模块(GeoJson,Autosuggest,Search)。我的地图目前需要大约7秒左右才能渲染到页面。
有没有人对我如何为移动设备加快速度提出任何建议?

I am wondering if there are any resources or best practices for preparing Bing Maps for mobile devices. For my map, I am using a couple of modules (GeoJson, Autosuggest, Search). My map is currently taking about 7 or so seconds before rendering to the page. Does anyone have any suggestions for how I can speed this up for mobile devices?

如果您有任何建议或疑问,请与我们联系。

Please let me know if you have any suggestions or questions.

谢谢!

推荐答案

这些模块相当小,可能不是问题。确保通过将数组作为数组传递到loadModule函数中来一次性加载模块。您可以在此处找到有关此内容的文章:  https://msdn.microsoft。 com / zh-CN / library / mt712870.aspx #Loading
多个模块
这将并行加载模块而不是同步加载模块。

Those modules are fairly small and likely not the issue. Be sure to load the modules all at once by passing them in as an array into the loadModule function. You can find a write up about this here: https://msdn.microsoft.com/en-us/library/mt712870.aspx#Loading Multiple Modules This will load the modules in parallel rather than synchronously which would be faster.

通常加载缓慢的首要原因是HTTP请求的数量。如果您有大量图像和/或文件,请尝试将它们组合在一起以减少需要下载的文件数。通常,文件的数量多于每个文件的大小,因为浏览器限制为可以进行的并发请求的数量。如果您有很多图像,请考虑创建图像精灵。 

Usually the number one reasons for slow loading is the number of HTTP requests. If you have a lot of images and or files, try and combine them together to reduce the number of files that need to be downloaded. Usually the number of files is more of a bottle neck than the size of each file as browsers are limited to the number of concurrent requests they can make. If you have a lot of images, consider creating an image sprite. 


这篇关于加快Bing Maps在移动设备上的加载时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆