您的位置:首页 > Web前端 > JavaScript

openlayers中获得geojson格式数据

2016-01-10 13:58 741 查看
function getGeoJson(layerName){
//layerName="TJDG:PipePoint",
var parr = {
REQUEST: "GetFeature",
typeName:layerName,
SERVICE: "WFS",
version:'1.0.0',
request:'GetFeature',
outputFormat:"json",
maxFeatures:1000
};
OpenLayers.loadURL("http://localhost:8080/geoserver/TJDG/ows", parr, this, succ, faill);
function succ(response){
var gmlParse = new OpenLayers.Format.GML();
alert(response.responseText);
}
function faill(response){
alert("无数据");
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: