如何在 iPhone 应用程序中使用自定义地图图像

发布于 2024-08-18 02:12:41 字数 303 浏览 4 评论 0原文

我一直在搜索如何在iPhone应用程序中使用自定义地图(例如:校园大学地图),使用坐标来获取我的实际位置等。

我找到了一种方法来做到这一点: - 使用谷歌代码项目:“Route-me”以及 OpenStreetMap 和 map2sqlite。

问题是:如何将我自己的地图图层(校园大学地图,PNG 文件)放入世界地图中以执行 map2sqlite 以获取“route-me”项目中的数据库。

我调查了 OpenStreetMap 站点,但没有找到方法,只能将路径添加到地图中,而不是其他图像地图(图块)。

太感谢了! 哈维尔.

I've searching about using custom maps (for example: a campus university map) in the iPhone App, using coordinates to get my actual position, etc.

I've found one way to do that:
- Using de google code project: "Route-me" with the OpenStreetMap and map2sqlite.

The question is: ¿How I can put my own map layer (the campus university map, PNG file) into the World map to execute map2sqlite for getting the DB in the "route-me" project.

I've investigated into the OpenStreetMap site, but I didn't found the way to do that, only to add paths into the map, but not other image maps (tiles).

Thank you so much!
Javier.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

給妳壹絲溫柔 2024-08-25 02:12:41

MapTiler 是你的朋友,你还需要这个小脚本来更改图块数量,然后将所有内容传递给map2sqlite,

for I in `find . -type f -maxdepth 3 -mindepth 2 -name *.png` 
    do OLDNAME=`basename $I .png` 
    DIRNAME=`dirname $I` 
    SEP1=${I#./} 
    SEP2=${SEP1%%/*} 
    NEWNAME=$((2**$SEP2-$OLDNAME-1)) 
    mv "$I" "$DIRNAME"/"$NEWNAME.png" 
done

然后你还可以使用 pngcrush 压缩 png 图像

MapTiler is your friend, you will also need this little script to change tiles number and then pass everything to map2sqlite

for I in `find . -type f -maxdepth 3 -mindepth 2 -name *.png` 
    do OLDNAME=`basename $I .png` 
    DIRNAME=`dirname $I` 
    SEP1=${I#./} 
    SEP2=${SEP1%%/*} 
    NEWNAME=$((2**$SEP2-$OLDNAME-1)) 
    mv "$I" "$DIRNAME"/"$NEWNAME.png" 
done

then you can also compress the png images with pngcrush

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文