ベクトルタイルポイントフィーチャにラベルを付けることを試みていますが、それらは常にタイル境界で切り取られます。私は(多くの他のものの中で)renderBufferオプションを成功させずに使ってみました。 私はOL 3.19を使用しています。ベクタータイルはGeoserver 2.10RC1で提供されています。私は本番環境で同じエラーを受け取り、無限の例(http://suite.opengeo.org/docs/latest/dataadmin/vectortiles/index.html)を編集しています。OL3/Geoserver:ベクトルタイルラベルが切り取られる
タイルはGeoserverから正しく提供され、プレゼンテーションの前に何らかの形でレンダリングしてタイルをスライスすると思うかもしれませんが、私はこれに固執しています。
アイデア?
Screenshot of the way it looks
とコードスニペット:<script>
var style_simple = new ol.style.Style({
fill: new ol.style.Fill({
color: '#ADD8E6'
}),
stroke: new ol.style.Stroke({
color: '#880000',
width: 1
}),
\t text: new ol.style.Text({
\t text:'LOREMIPSUM'})
});
function simpleStyle(feature) {
return style_simple;
}
var map = new ol.Map({
target: 'map',
view: new ol.View({
\t \t center: [0,0],
\t \t zoom: 4
}),
layers: [new ol.layer.VectorTile({
\t renderBuffer:50, //doesn't matter
style:simpleStyle,
source: new ol.source.VectorTile({
tilePixelRatio: 1,
tileGrid: ol.tilegrid.createXYZ({maxZoom: 19}),
format: new ol.format.MVT(),
url: 'http://localhost:8080/geoserver/gwc/service/tms/1.0.0/[email protected]%[email protected]/{z}/{x}/{-y}.pbf'
})
})]
});
</script>
'renderBuffer'オプションは役に立ちません。下の回答に示唆されているように、タイルは隣接するタイルのラベルポイントを繰り返す必要があります。 – ahocevar