线和绘图Android版中的谷歌地图绘制顺序 [英] Lines and drawables draw order in Android Google Maps

查看:169
本文介绍了线和绘图Android版中的谷歌地图绘制顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对不起,我的英语;-P!

sorry for my english ;-P!

我正在写一个应用程序,显示在谷歌地图管道和阀门(线和点)。对于我两班。

I'm writing an app that shows in google maps pipes and valves(lines and points). For that i've two classes.

一位来自ItemizedOverlay延伸,我添加到地图叠加一个阀门的每一类,每一个可以有多个项目。

One extends from ItemizedOverlay, and i add to map overlay one for each category of valve, and each one can have more than one item.

第二,从覆盖延伸,在抽签方法Y绘制在画布的方法DrawLine的就行了。

The second extends from Overlay, and in the draw method y draw the line with the method drawline of the canvas.

我的问题是,该线被绘制在ItemizedOverlay项,无论我将它们添加到调用MapView.getOverlays(次序)。

The problem i've is that the lines are drawn over the ItemizedOverlay items, no matter the order i add them to the mapView.getOverlays().

我想在所有叠加底部的线条。有没有办法做到这一点。

I want the lines on the bottom of all overlays. is there a way to do that.

非常感谢。

推荐答案

我已经解决了!我不知道,当你填充itemizedovelay项目,他们会自动被添加到地图中,所以我加入lineoverlays之前填充它们之后,我再次加入他们。

I've solved it! I didn't know that when you populate the itemizedovelay items, they automatically are added to the map, so i was populating them before adding the lineoverlays and after that i were adding them again.

将它们添加到getOverlays()顺序会影响正常!

The order you add them to getOverlays() affects correctly!!

Thks

这篇关于线和绘图Android版中的谷歌地图绘制顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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