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("无数据"); } }
相关文章推荐
- 回顾Quick Sort(Javascript 实现)
- js实现table排序
- three.js学习笔记 相机控件
- JavaScript全选复选框checkbox效果
- Js中的转向问题
- JS页面刷新总结
- JavaScript全选复选框checkbox效果
- Js中的转向问题
- JS页面刷新总结
- 一个图片显示的JS示例
- 一个图片显示的JS示例
- 如何将phantomjs单独部署在服务端
- jsp中使用out和response.getOutputStream的方法
- [ExtJS5学习笔记]第十五节 Extjs5表格显示不友好?panel的frame属性在作怪
- javascript 面向对象总结
- javascript常用方法总结
- JavaScript 对象 之创建对象 学习笔记
- JSP自定义标签——简单标签(2)
- JSP自定义标签——简单标签(1)
- js的效率问题