Error when posting features to postgis by openlayers and geoserver

我只是一个虾纸丫 提交于 2019-12-02 04:32:49

Welcome to the wonderful world of axis orientation trouble. Fortunately, GeoServer has an alternative SRS code for [lon, lat] order, which is "CRS:84" instead of "EPSG:4326":

var feature = evt.feature;
var node = format.writeTransaction([feature], null, null, {
  gmlOptions: {srsName: "CRS:84"},
  featureNS: "ucoc.zhtx.com",
  featureType: "landblock"     
});             
var data = new XMLSerializer().serializeToString(node);
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!