ǰ̨ÀûÓÃ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Îļþ£¬»ñÈ¡Ìض¨Ïß·վµã¾Î³¶È
* ´ËÀàÓÃÓÚǰ̨£Ê£ÓÉú³É±àÂëÕÛÏß
* ½âÎö´ËÀà¸ñʽ
* * <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
Ä£·ÂjQuery£¬Éè¼ÆÁËÒ»¸ö»º´æϵͳ¡£ÏñjQuery.dataÕâÑùµÄ¶«Î÷£¬PrototypeÓëmootoolsÒ²ÓУ¬Ä¿µÄ¶¼ÊÇÓÃÀ´¸¨Öúʼþϵͳ£¬ÓÃÀ´»º´æÆäÖÐÉú³ÉµÄÊý¾Ý£¬¶ø·Ç»º´æÆÕͨº¯ÊýÉϴμÆËãµÄ½á¹û¡£PrototypeÀûÓÃÁËËüµÄHashÀ࣬mootoolsûϸ¿´£¬ËüÄÚ²¿ºÃÏñÓÃÀ´»º´æuuid¡£Ò»¸ö¹²Ê¶ÊÇ£¬ÎªÒ³ÃæÓõ½µÄÔªËØÉèÖÃuuid·Ç³£ÓÐÓã¬Òª²éÕÒÔªËØʱ£¬¿ÉÒÔ±ÜÃâÖ ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;&n ......