且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

自定义Google地图叠加?

更新时间:2022-11-18 20:11:56

有几种不同的方法可以做到这一点。一种方法是创建一个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.