During these days, I am obsessed by a big problem —— how to get the vector tile by Geoserver? I have looking for many docs and blogs, and there are some useful resource for the problem, the operation is very easy if step by step: http://suite.opengeo.org/docs/latest/dataadmin/vectortiles/index.html;
But after these operations, I still don't get success, i wonder to konw the reason, if you have some idea, please sharing with me, thanks for your kind~
ps:there is some message from console,maybe it's useful: about gwc seeding:
10 一月 10:27:45 INFO [seed.SeedTask] - GWC Seeder Thread-4 completed (re)seeding layer cn:roads after 192 tiles and 2 seconds.
10 一月 10:27:45 INFO [seed.SeedTask] - GWC Seeder Thread-3 completed (re)seeding layer cn:roads after 80 tiles and 2 seconds.
10 一月 10:27:45 INFO [seed.GWCTask] - Thread group finished SEED task after 2.578 seconds
I don't have enough reputation, so I copy the message to here instead of sending a image, sorry
//*************************************************************************
I have already added the vector-tiles plugin,
and there are some errors when I request the tiles:
http://localhost:8080/geoserver/gwc/service/tms/1.0.0/cite:DLZXX_2011_PL_10000@EPSG%3A4326@geojson/11/1673/891.geojson 404 (Not Found)
//the code to get vector tiles
var vectorTile = new ol.layer.VectorTile({
//get source
source: new ol.source.VectorTile({
format:new ol.format.GeoJSON(),
tileGrid: ol.tilegrid.createXYZ({
maxZoom:14
}),
tilePixelRatio:1,
url:'/geoserver/gwc/service/tms/1.0.0/'+layerName
+'@EPSG%3A4326@geojson/{z}/{x}/{y}.geojson'
}),
style:initStyle
});
map.addLayer(vectorTile);
Header of each Tile GET request
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encodin: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Cookie: JSESSIONID=9679B11893A04A0ACE21D49D93AB7CDC
Host: localhost:8080
Referer: http://localhost:8080/23DPlatform/index.jsp
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Header of response
Content-Disposition :inline; filename=geoserver-dispatch.text
Content-Encoding: gzip
Content-Type: text/plain
Date: Tue, 10 Jan 2017 13:01:09 GMT
Server: Apache-Coyote/1.1
Transfer-Encoding:chunked
//***************************************************************
Maybe you can read this question, there are some similar
Ionic / Leaflet - Can't get Tiles 404 Not Found (from cache)