几何线条显示

时间:2015-02-14 11:33:49

标签: google-maps google-maps-api-3 geometry

下面显示的图像有省线,这是7的缩放。如果我缩小到6,这些省线就会消失。

Province Lines at Zoom 7.

No Province Lines at Zoom 6.

有没有办法获得这些线,即使在Zoom 6?我试过通过风格向导:http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html?utm_medium=twitter,但没有运气..

提前致谢!

1 个答案:

答案 0 :(得分:1)

一个选项是从样式化地图中删除所有省线。使用FusionTablesLayer或KmlLayer

添加它们
var stateBorders = new google.maps.FusionTablesLayer({
    query: {
        select: 'kml_4326',
        from: '19lLpgsKdJRHL2O4fNmJ406ri9JtpIIk8a-AchA'
    },
    map: map,
    styles: [{
        polygonOptions: {
            fillOpacity: 0.001,
            strokeColor: "000000",
            strokeWeight: 1,
            strokeOpacity: 1.0,
            fillColor: "FFFFFF"
        }
    }]
});

Proof of concept fiddle using FusionTablesLayer