1
Есть ли способ избежать cropped point styles при рендеринге в ol.layer.VectorTile
Слой с использованием OpenLayers 3 (v3.18.2)?Стиль точки плитки слои объектов в OpenLayers 3 получить обрезанные
Вот соответствующий код, например:
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. https://github.com/TileStache/TileStache/pull/264/commits/cbacf9c7fdb17ac8d4e94631e0f6b9254888500d –