当前位置:软件学习 > 其它软件 >>

为什么不能从PostgreSQL里取出数据

我做getfeature 功能时,为什么不能将数据库里的数据取出来,只能看到数据库里的字段名。数据库用的是PostgreSQL,服务器是:Geoserver.

代码如下:
  map.addControl(new OpenLayers.Control.Permalink('Permalink'));
    map.zoomToMaxExtent();
    map.events.register('click',map,function(e) {
            OpenLayers.Util.getElement('nodeList').innerHTML = "Loading... please wait...";
          
            var params =  map.layers[0].getFullRequestString({
                            REQUEST: "GetFeatureInfo",
                            EXCEPTIONS: "application/vnd.ogc.se_xml",
                            BBOX: map.layers[0].getExtent().toBBOX(),
                            X: e.xy.x,
                            Y: e.xy.y,
                            INFO_FORMAT: 'text/html',
                            QUERY_LAYERS: map.layers[0].params.LAYERS,
                            WIDTH: map.size.w,
                            HEIGHT: map.size.h,
                            METHOD:"post",
                            SERVICE:"WMS",
                            SRS: 'EPSG:4326',
                            FEATURE_COUNT: 50
                        });
                    
            OpenLayers.loadURL("http://localhost:8080/geoserver/wms",params, this, setHTML);
           
            OpenLayers.Event.stop(e);
      }); --------------------编程问答-------------------- XUEXI --------------------编程问答-------------------- 看看Geoserver是否把对应的图层发布出来了,在Geoserver的测试页面测试getfeature是否返回数据  --------------------编程问答-------------------- 检查字符集编码
补充:企业软件 ,  地理信息系统
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,