zoukankan      html  css  js  c++  java
  • javascript download geoserver layer as kml file

     var sqlfilter = " CITY='" + city + "' and SDATE>" + sdate + " and SDATE <" + edate;

    soMapRoad.downLoadGeoLayer(actionId, kpi, layerTitle, sqlfilter);
     
     function downloadTileGridMap(layerName, styleId, filterQuery) {

            var url = "http://" + geoIP + "/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&LAYERS=FAST:" + layerName + "&STYLES=" + styleId + "&CQL_FILTER=" + filterQuery + "&bbox=109.0,20.0,118.0,26.0&width=768&height=512&srs=EPSG:4326&format=application/vnd.google-earth.kml+xml";
                     
            window.open(url);
        }


        function downLoadGeoLayer(currentActionId, kpi, sqlfilter) {

            $.getJSON("../Action.json",
                function (json) {
                    $.each(json,
                        function (infoIndex, info) {

                            var actionId = info["ID"];

                            if (actionId === currentActionId) {
                                var layerName = info["layers"];
                                var styleId = info["style"];
                                var bbox = info['filter'];
                                var filter = sqlfilter;
                                downloadTileGridMap(layerName, styleId, filter, bbox);
                            }
                        });
                });
        }
  • 相关阅读:
    寒假学习进度-14(疫情)
    寒假学习进度-13(Python自然语言处理)
    寒假学习进度-12(热词展示)
    寒假学习进度-11(词云图的使用)
    寒假学习进度-10(pyecharts的下载和使用)
    寒假学习进度-9(spark streaming编程初级实践)
    寒假学习进度-8(热词爬取)
    寒假学习进度-7(Python爬虫)
    寒假学习进度-6(Python连接MySQL数据库)
    寒假学习进度-5
  • 原文地址:https://www.cnblogs.com/googlegis/p/11764947.html
Copyright © 2011-2022 走看看