在Google Map顶部绘制自定义地图图块图像(.png) [英] Draw custom map tile images (.pngs) on top of Google Map - Android
问题描述
我在英国部分地区拥有地图瓷砖的png图像,我想将它们绘制在google maps视图的顶部,我做了所有设置,只是想现在就可以绘制瓷砖图像.
I have png images of map tiles over parts of the UK and i want to draw them on top of the google maps view, I have everytyhing set up, just want to be able to draw the tile images now.
我的主类扩展了'MapActivity',我可以添加画布功能来绘制它们吗?
My main class extends 'MapActivity', can i add a canvas function to draw them?
此外,我显然只需要绘制电话上可见的图块,而不应绘制看不见的图块.
ALso, I only obviously need to draw the tiles that are in view on the phone while the tiles out of view should not be drawn.
推荐答案
您可以在MapView中添加一个Overlay,这将为您提供一个可以绘制的画布.请参阅 http://code.google.com/android/add-ons/google-apis/reference/com/google/android/maps/Overlay.html
You can add an Overlay to the MapView, that will get you a canvas to draw on. See http://code.google.com/android/add-ons/google-apis/reference/com/google/android/maps/Overlay.html
这篇关于在Google Map顶部绘制自定义地图图块图像(.png)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!