是否可以在谷歌地图V2中更改网格大小?

时间:2015-09-01 08:22:32

标签: android google-maps markerclusterer

是否可以更改Google地图中标记的网格大小。我已经自定义DefaultClusterRenderer来更改标记的颜色,现在我想更改网格大小。我不知道该怎么做。我在DefaultClusterRenderer类中找到了以下函数:

private static Point findClosestCluster(List<Point> markers, Point point) {
    if(markers != null && !markers.isEmpty()) {
        double minDistSquared = 10000.0D;
        Point closest = null;
        Iterator i$ = markers.iterator();

        while(i$.hasNext()) {
            Point candidate = (Point)i$.next();
            double dist = distanceSquared(candidate, point);
            if(dist < minDistSquared) {
                closest = candidate;
                minDistSquared = dist;
            }
        }

        return closest;
    } else {
        return null;
    }
}

我想如果我能以某种方式改变minDistSquared的值,那么标记的网格大小将会改变。请帮我怎么做。提前致谢

0 个答案:

没有答案