易截截图软件、单文件、免安装、纯绿色、仅160KB

前台利用javascript解析Json数据,生成编码折线

前台利用javascript解析Json数据,生成编码折线,因为利用浏览器解析,数据量大的情况下,会锁定浏览器,脚本执行太慢。
package unit;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
import org.dom4j.Document;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import net.sf.json.JSONArray;
/**
* 解析KML文件,获取特定线路站点经纬度
* 此类用于前台JS生成编码折线
* 解析此类格式
* * <coordinates>
114.603325, 37.427359, 50.90
114.604025, 37.428438, 50.90
114.599972, 37.525815, 29.90
114.598970, 37.535222, 33.40
114.589994, 37.617946, 34.80
114.589880, 37.618956, 35.20
114.579965, 37.694322, 39.40
114.579317, 37.695190, 40.30
114.569753, 37.708272, 42.60
114.569112, 37.709142, 43.20
114.559623, 37.722202, 45.10
114.558989, 37.723076, 45.40
114.549448, 37.736103, 49.20
114.548594, 37.737259, 49.60
114.539893, 37.753110, 44.90
114.539696, 37.754055, 44.70
114.529925, 37.799285, 52.80
114.529705, 37.800290, 52.80
114.519833, 37.845255, 51.00
114.519614, 37.846256, 51.40
114.509846, 37.891104, 49.50
114.509624, 37.892112, 49.30
</coordinates>
的数据
*
* @author libin
*
*/
public class KmlParse {
//存储xml元素信息的容器
private static List<Leaf> elemList = new ArrayList<Leaf>();

@SuppressWarnings("unchecked")
public static List nameTable = new ArrayList();//名称
@SuppressWarnings({ "unchecked"})
public static Hashtable LONGTable = new Hashtable();//经度
@SuppressWarnings("unchecked")
public static Hashtable dimenTable = new


相关文档:

javascript感言

                                                    ......

asp.net 在前台和后台调用 javascript 函数

1、直接在前台调用 javascript 函数
很简单,在 head 元素之间加入 script 元素,将 type 元素设置为 " text/javascript "
如:
<head runat="server">
<mce:script type="text/javascript" ><!--
function ShowName(str)
{
alert("您的名字为:("+str+")");
}
// --></mce:script>
< ......

javascript 浏览器页面跳转

    if (elename.equalsIgnoreCase("back") || elename.equalsIgnoreCase("1"))
            return "<a href=\"javascript:window.history.back()\">后退</a>";
      &nbs ......

javascript common

1.document.write( " "); 输出语句
2.JS中的注释为//
3.传统的HTML文档顺序是:document- >html- >(head,body)
4.一个浏览器窗口中的DOM顺序是:window- >(navigator,screen,history,location,document)
5.得到表单中元素的名称和值:document.getElementById( "表单中元素的ID號 ").name(或value)
6 ......

javascript继承

用call方法实现继承
function classA(sColor){ 
       this.color=sColor; 
       this.sayColor=function(){ 
         alert(this.color); 
       ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号