谷歌地图API V2为Android:不能得出像pcated叠加德$ P $ [英] Google Maps API v2 for Android: Cannot draw like deprecated Overlay
问题描述
我开发一个Android应用程序,并且我已经从谷歌地图移动对于Android的API V1至V2。
随着德precated版本1我创建了一个覆盖绘制一些彩色的形状(限定区域)和信息文本在我的地图,但现在我一直在看API V2,不能这样做。
我已试图使用多边形属性,但它不与任何颜色填充,也许是因为我的形状不能在逆时针方向由于它们的图案绘制,例如用U图案的形状。另外,我也不知道如何把一个文本(没有标记,只是文字),在地图上。
在此先感谢。
还是不知道如何把一个文本地图
创建一个位图
包含文本,并使用<一个href="https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/model/GroundOverlay"相对=nofollow>一个 GroundOverlay
,或可能<一href="https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/model/TileOverlay"相对=nofollow>一个 TileOverlay
。
I have developing an Android application, and I have moved from Google Maps for Android API v1 to v2.
With deprecated version 1 I created an Overlay for drawing some colored shapes (delimiting zones) and info text over my map, but now I have been viewing API v2 and cannot do the same.
I have trying to use Polygon property, but it doesn't fill with any colour, maybe because my shapes cannot be drawing in counterclockwise due to the pattern of them, for example a shape with 'U' pattern. Also, I don't know either how to put a text (no marker, just text) over the map.
Thanks in advance.
still don't know how to put a text in the map
Create a Bitmap
containing your text, and use a GroundOverlay
, or possibly a TileOverlay
.
这篇关于谷歌地图API V2为Android:不能得出像pcated叠加德$ P $的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!