在谷歌地图API的Andr​​oid定制V2的MapView Overrinding平局() [英] Overrinding draw() in customized MapView in Google Maps Android API v2

查看:197
本文介绍了在谷歌地图API的Andr​​oid定制V2的MapView Overrinding平局()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很简单的问题:因为图形页面查看继承,是否有可能重写画()来画任何你想要的地图上?

Very simple question : since MapView inherits from View, is it possible to override draw() to draw whatever you want on the map ?

推荐答案

没有,但你可以用折线,多边形,圆形。如果这还不够,你可以把任何位图(即使你画到使用Canvas)联合地面覆盖。如果这还不够,你也可以用方块叠加绘制有效整个地图上。

No, but you can use polylines, polygons, circles. If that's not enough you can put any bitmap (even one you draw to using Canvas) combined with ground overlay. If that's not enough, you can also use tile overlay to draw on entire map efficiently.

这一切都没有在文档中,我鼓励你学习。

It's all there in the documentation, I encourage you to study.

图纸直接可以总是在与地图重叠的看法做了,但它不会与地图滚动好听,所以最好使用上述工艺。

Drawing directly can be always done on a view that overlaps with map, but it won't scroll with map nicely, so better to use technics above.

直接在地图上绘制是不可能的,因为它不会在过程中发生AFAIK

Drawing directly on the map is impossible, because it doesn't happen in your process afaik.

这篇关于在谷歌地图API的Andr​​oid定制V2的MapView Overrinding平局()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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