将形状放入 Android 中的 MapView 中
有没有办法在 MapView (纬度/经度区域)而不是像素区域中放置占据特定区域的形状(可绘制或任何类型的形状)。我需要它用于 GeoPoint 聚类目的,
如果不可能,任何使用投影坐标进行此操作的指导将不胜感激。但是使用 MapView 画布来执行此操作似乎并不明智,因为我一直在回收覆盖项目,并且我希望我也可以利用这一点。
Is there a way to place a shape (drawable or shape of any kind) that occupies a specific area in MapView (lat/lon area) not pixel area . I need that for GeoPoint Clustering purposes
If that is not possible any guidance to do it with projection coordinates would be greatly appreciated. But using the MapView canvas to do this doesn't seem performance-wise since i recycle my Overlay Items all the time and i wish i could take advantage of that too.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看ItemizedOverlay
我正在从我的代码中剔除,所以这可能不会'开箱即用地编译,但应该给你足够的东西从这里弄清楚......
扩展类:
然后在你的活动中......
Look atItemizedOverlay
I'm culling from my code, so this probably wont' compile out of the box, but should give you enough to figure it out from here...
extended class:
and then in your activity....
因此,解决方案是绘制到保存项目的 ItemizedOverlay。
So the solution is to draw to the ItemizedOverlay that holds the items.