Openlayers 3 OpenLayers 3中的样式向量平铺层点特征被裁剪

Openlayers 3 OpenLayers 3中的样式向量平铺层点特征被裁剪,openlayers-3,Openlayers 3,使用OpenLayers 3(v3.18.2)在ol.layer.VectorTile层中渲染时,有没有避免的方法 以下是示例的相关代码: layer = new ol.layer.VectorTile({ source: new ol.source.VectorTile({ url: 'http://localhost:8181/schools/{z}/{x}/{y}.pbf', format: new ol.format.MVT(),

使用OpenLayers 3(v3.18.2)在
ol.layer.VectorTile
层中渲染时,有没有避免的方法

以下是示例的相关代码:

layer = new ol.layer.VectorTile({
    source: new ol.source.VectorTile({
        url: 'http://localhost:8181/schools/{z}/{x}/{y}.pbf',
        format: new ol.format.MVT(),
        tileGrid: ol.tilegrid.createXYZ({maxZoom: 22}),
        tilePixelRatio: 16
    }),
    style: function(feature) {
        return new ol.style.Style({
            image: new ol.style.Circle({
                fill: new ol.style.Fill({
                    color: 'rgba(105, 105, 105, 1.0)'
                }),
                stroke: new ol.style.Stroke({
                    width: 1,
                    color: 'rgba(105, 105, 105, 0.3)'
                }),
                radius: 7
            }),
            text: new ol.style.Text({
                color: '#FFFFFF',
                fontFamily: 'Calibri,sans-serif',
                fontSize: 12,
                text: feature.get("count").toString(),
                labelYOffset: -12
            })
        });
    }
});
map.addLayer(layer);

您必须以不同的方式生成矢量图块,即使用缓冲区,因此您的图块还包括来自相邻图块的附近点。

您必须以不同的方式生成矢量图块,即使用缓冲区,因此您的图块还包括来自相邻图块的附近点。

谢谢您的提示!!!!成功了!!!我建议在TileStache中添加该参数。谢谢你的提示!!!!成功了!!!我建议在TileStache中添加该参数。