Popular Posts
javax.net.ssl.SSLHandshakeException: Connection closed by peer in Android 5.0 Lollipop Recently, there is a error occurs when access website via ssl connection like below although it worked fine several days ago. // Enable SSL... Tired of Hibernate? Try JDBI in your code JDBI Quick sample ICategoryDAO.java : create a data access interface (implement is not required) package com.prhythm.erotic.task.data.... Enable SSL connection for Jsoup import org.jsoup.Connection; import org.jsoup.Jsoup; import javax.net.ssl.*; import java.io.IOException; import java.security.KeyManagement...
Blog Archive
Stats
A simple map
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>電子地圖</title>

    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=mykey"
        type="text/javascript"></script>

    <script type="text/javascript">
     //<![CDATA[
    var map = false;
    var geocoder = new GClientGeocoder(); //解譯程式
    var address = "中山北路2段52號";
    //geocoder.getLatLng(address, showMark);
    function showMark(point) {
        if (!point) {
            alert("Not found.");
        } else {
            map.setCenter(point, 16);
            var marker = new GMarker(point);
            map.addOverlay(marker);
            marker.openInfoWindowHtml("<table border=\"0\" style=\"margin-top:10px;\"><tr><td>查詢位置</td><td>"+address+"</td></tr><tr><td>座標</td><td>"+point+"</td></tr></table>");
        }
    }
    function init(){
        if(GBrowserIsCompatible()){
            map = new GMap2(document.getElementById("map"));
            map.setCenter(new GLatLng(25.029075,121.520034), 15);
            map.addControl(new GLargeMapControl());
            map.addControl(new GMapTypeControl());
        }
    }
     //]]>
    </script>

</head>
<body onload="init();">
    <center>
        <div style="width: 963px;text-align:left;">
            <input id="searcht" type="text" /><input type="button" value="搜尋" onclick="address=document.getElementById('searcht').value;geocoder.getLatLng(address, showMark);"/>
            <div id="map" style="width: 100%; height: 600px">
            </div>
        </div>
    </center>
</body>
</html>