【发布时间】:2013-06-12 06:15:39
【问题描述】:
如果我的问题太简单,请道歉。
我正在开发一个 android 应用程序,在该应用程序中我在地图中显示用户位置。我还在用户点周围显示一个圆圈。
我在 ItemizedOverlay 中的代码是:
public void setGeoPoints(GeoPoint theGeoPoints, int theCircleRadius)
{
this.itsGeoPoints = theGeoPoints;
itsPaint = new Paint();
itsPaint.setARGB(10, 0, 0, 205);
this.itsCircleRadius = theCircleRadius;
}
@Override
public void draw(Canvas theCanvas, MapView theMapView, boolean shadow)
{
super.draw(theCanvas, theMapView, shadow);
Point pt = theMapView.getProjection().toPixels(itsGeoPoints, null);
float projectedRadius = theMapView.getProjection().metersToEquatorPixels(itsCircleRadius);
theCanvas.drawCircle(pt.x, pt.y, projectedRadius, itsPaint);
}
使用上面的代码,我在用户位置周围完美地得到了一个蓝色圆圈。
现在,我需要为圆圈设置不同颜色的边框。也就是说,一个带有粗边框的圆圈(不同的颜色)。
请在这方面提供任何帮助。
谢谢。
【问题讨论】:
标签: android android-layout android-maps android-maps-v2