映射平铺缓存用于离线查看 [英] Map Tile Caching for Offline Viewing

查看:140
本文介绍了映射平铺缓存用于离线查看的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个将使用Open Street Maps开源地图的应用程序(虽然该概念应适用于任何地图提供程序)。该应用程序将使用户能够在离开之前沿着路线指定一些路点。

I'm trying to build an application that will use open source maps from Open Street Maps (though the concept should be applicable to any map provider). The application will enable the user to specify a number of waypoints along a route prior to departure.

由于我的手机没有数据计划(因为在乡村里漫步很少给你一个很好的关系),我希望能够在出发前预先加载相应的地图和路线,以便地图可以在没有数据连接的情况下继续使用。

Because I don't have a data plan for my cell phone (and because rambling in the countryside rarely gives you a good connection), I want to be able to pre-load the relevant map tiles for the waypoints and/or route before departure so that maps can continue to be used without a data connection.

我的初步想法是从地图提供商下载所需的图块,并将其存储在隔离的存储空间中。但是,使用 TileSource 类的Bing Maps控件实现依赖于返回一个绝对URI,它可以从其中下载,这显然不会与数据存储在隔离存储中。

My initial thoughts are to download the required tiles from the map provider and store them in isolated storage. However, the Bing Maps control implementation, which uses the TileSource class relies on returning an absolute URI that it can download the tile(s) from, which clearly won't work with data stored in isolated storage.

问题已经被问到: Windows Phone 7 Map Control with custom layer in offline mode ,但没有回答,我想知道如果从那以后,任何人都破解了这个问题。

The question has already been asked: Windows Phone 7 Map Control with custom layer in offline mode, but wasn't answered and I'm wondering if since then anyone has cracked the problem.

推荐答案

我已经看到这样一个自定义图层放在地图上。然后从你喜欢的任何地方(IsolatedStorage,online,somehwere else?)加载瓷砖到自定义层。

I've seen this done with a custom layer placed over the map. Tiles are then loaded from anywhere you like (IsolatedStorage, online, somehwere else?) into the custom layer.

对不起,我没有任何代码,我可以分享哪些现在证明了这一点,但目前正在做一些非常相似的事情。

Sorry, I don't have any code I can share which demonstrates this at the moment but am currently doing something very similar.

这篇关于映射平铺缓存用于离线查看的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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