一、为什么需要缓存
因为通过earth文件实时从网站上加载图片很慢,每次看地图细节需要20多秒,很费时间,缓存可以将经常打开的地方的图片,缓存到本地,下次打开相同地方的时候,就可以读取本地图片了,加载速度大大提升
二、代码
只需要修改earth文件即可
clear.earth
<map name="ArcGIS Online" type="geocentric" version="2">
<image name="arcgis-world-imagery" driver="arcgis">
<url>http://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/</url>
<nodata_image>http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/100/0/0.jpeg</nodata_image>
<cache_policy usage="read_write"/>
</image>
<image name="arcgis-transportation" driver="arcgis" enabled="false">
<url>http://services.arcgisonline.com/ArcGIS/rest/s