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);
                        }
                    });
            });
    }

javascript download geoserver layer as kml file的更多相关文章

  1. Download google drive public shared file in terminal

    http://unix.stackexchange.com/questions/136371/how-to-download-a-folder-from-google-drive-using-term ...

  2. Python download a image (or a file)

    http://stackoverflow.com/questions/13137817/how-to-download-image-using-requests import shutil impor ...

  3. 使用 JavaScript File API 实现文件上传

    概述 以往对于基于浏览器的应用而言,访问本地文件都是一件头疼的事情.虽然伴随着 Web 2.0 应用技术的不断发展,JavaScript 正在扮演越来越重要的角色,但是出于安全性的考虑,JavaScr ...

  4. ASP.NET MVC file download sample

    ylbtech- ASP.NET MVC:ASP.NET MVC file download sample 功能描述:ASP.NET MVC file download sample 2,Techno ...

  5. [FILE API]利用Javascript上传图片

    1.HTML结构 <label for="file-input">File:</label> <input type="file" ...

  6. JavaScript资源大全中文版(Awesome最新版)

    Awesome系列的JavaScript资源整理.awesome-javascript是sorrycc发起维护的 JS 资源列表,内容包括:包管理器.加载器.测试框架.运行器.QA.MVC框架和库.模 ...

  7. JavaScript实现单张图片上传功能

    前台jsp代码 <%@ page language="java" pageEncoding="UTF-8" contentType="text/ ...

  8. Execute Javascript in iOS Applications

    In this tutorial, I have covered How to execute JavaScript in iOS / Objective-C. You can execute Jav ...

  9. geoserver REST使用

    1.部署一个简单的测试环境 测试geoserver REST接口,我们可使用python来测试,很方便.需要下载包: python,http://python.org/.我下载的是Python27版本 ...

随机推荐

  1. MongoDB集群负载不均衡问题定位及解决

    1.问题描述 这是一套运行在腾讯云上的MongoDB 3.6版本集群,共5个分片,每片规格是6核16GB. 在压测的过程中,发现第3个分片的CPU使用率长时间高达96%,其它4个分片的CPU使用率都没 ...

  2. 清北学堂—2020.1提高储备营—Day 2 afternoon(线段树、树状数组)

    qbxt Day 2 afternoon --2020.1.18 济南 主讲:李佳实 目录一览 1.线段树 2.二叉搜索树(略过) 3.树状数组 总知识点:基础数据结构(本人初学感觉好难) 一.线段树 ...

  3. 面试 Spring Boot 再也不怕了,答案都在这里!

    问: 什么是spring boot? 答:多年来,随着新功能的增加,spring变得越来越复杂.只需访问页面https://spring.io/projects,我们将看到所有在应用程序中使用的不同功 ...

  4. Win10的Cortana小娜反应慢?试试这个方法

    https://www.ithome.com/html/win10/158466.htm Win10语音助手Cortana小娜可以为用户提供全面的搜索服务,不管是本地还是在线,都可以轻松找到结果.不过 ...

  5. 数据结构实验之栈与队列十一:refresh的停车场

    数据结构实验之栈与队列十一:refresh的停车场 Description refresh最近发了一笔横财,开了一家停车场.由于土地有限,停车场内停车数量有限,但是要求进停车场的车辆过多.当停车场满时 ...

  6. Linux内核镜像文件格式与生成过程(转)

    <Linux内核镜像格式>   Linux内核有多种格式的镜像,包括vmlinux.Image.zImage.bzImage.uImage.xipImage.bootpImage等. ➤k ...

  7. 2019牛客多校第八场 F题 Flowers 计算几何+线段树

    2019牛客多校第八场 F题 Flowers 先枚举出三角形内部的点D. 下面所说的旋转没有指明逆时针还是顺时针则是指逆时针旋转. 固定内部点的答案的获取 anti(A)anti(A)anti(A)或 ...

  8. Android实战项目:房贷计算器

    APP源码已上传到我的GitHub:https://github.com/zdm-code/Android-learning/tree/master/android_learning/mortgage ...

  9. 【Spring】利用spring的JdbcTemplate查询返回结果映射到自定义类型

    // org.springframework.jdbc.core.JdbcTemplate 中的查询方法基本都有支持参数RowMapper<T> rowMapper的重载方法.下面只是随便 ...

  10. CodeForces - 1105D 多源搜索

    #include<bits/stdc++.h> using namespace std; typedef long long ll; struct node{ int x,y; ll se ...