在这些日子里,我沉迷于一个大问题 - 如何通过Geoserver获得矢量图块?我一直在寻找很多文档和博客,并且有一些有用的资源来解决这个问题,如果一步一步的操作非常简单: http://suite.opengeo.org/docs/latest/dataadmin/vectortiles/index.html;如何通过Geoserver获取矢量图块?
但这些操作后,我仍然没有得到成功,我不知道到konw的原因,如果你有一些想法,请与我分享,谢谢你的那种〜
PS:有一些消息从控制台,也许它是有用的: 关于gwc种子:
10一月10:27:45 INFO [seed.SeedTask] - GWC播种机层次4 - 完成(重新)播种层cn:道路后192个瓷砖和2秒。
10一月10:27:45 INFO [seed.SeedTask] - GWC Seeder Thread-3完成(重新)播种层cn:80个瓦片和2秒后的道路。
10一月10时27分45秒INFO [seed.GWCTask] - 线程组完成SEED2.578秒
后的任务,我没有足够的声誉,所以我的邮件复制到这里,而不是发送的图片,对不起
// ***************************************** ********************************
我已经添加矢量瓷砖插件,
并且在请求瓷砖时出现一些错误:
//代码即可获得矢量瓦片
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%[email protected]/{z}/{x}/{y}.geojson'
}),
style:initStyle
});
map.addLayer(vectorTile);
每一瓦片的标头GET请求
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
部首响应
的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
// ******************************************** *******************
也许你可以阅读这个问题,也有一些类似的
请添加设置的更多细节,你添加了矢量瓷砖插件吗?当您请求瓷砖时,您在日志中看到什么错误?注意:上面的行是INFOrmative而不是ERRORs, –
@iant是的,当然。我已经添加了矢量瓷砖插件,并有源:http://ares.boundlessgeo.com/geoserver/master/ext-latest/ 当我要求瓷砖时有一些错误: ol.js: 428 GET http:// localhost:8080/geoserver/gwc/service/tms/1.0.0/cite:DLZXX_2011_PL_10000 @ EPSG%3A4326 @ geojson/11/1673/892.geojson 404(Not Found) – ZijianLiu
请编辑问题这个信息 –