自定义Google地图叠加? [英] Custom Google Map overlay?

查看:126
本文介绍了自定义Google地图叠加?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您如何在Google地图上使用自定义图块集/叠加层,就像在这里完成的那样:

http://www.philaplace.org



这很酷,我想试试这个。

解决方案

有几种不同的方法可以做到这一点。一种方法是创建一个GTileLayer对象并实现getTileURL()以返回指向您的图块的URL。

但是首先你需要一个能够以拼贴格式正确剪切的图像。对于初学者,我建议你看看MapTiler: http://www.maptiler.org/ 它会为您剪切图片,并生成带覆盖图的GoogleMap。


How can you use a custom tileset/overlay on a Google map, like was done here:

http://www.philaplace.org

That is pretty cool, and I would like to experiment with this.

解决方案

There are a couple different ways to do it. One way is to create a GTileLayer object and implement the getTileURL() to return the URL pointing to your tiles.

But first you'll need an image that's cut properly in the tile format. For starters, I'd recommend you look at MapTiler: http://www.maptiler.org/ It will cut images for you AND generate a GoogleMap with the overlay.

这篇关于自定义Google地图叠加?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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