<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>urmapapi</title>
	<atom:link href="http://apiblog.urmap.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://apiblog.urmap.com</link>
	<description>關於urmapapi的技術討論</description>
	<lastBuildDate>Mon, 28 Sep 2009 06:16:57 +0000</lastBuildDate>
	<language>zh-tw</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='apiblog.urmap.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/1b045e630d943cdfba655df89a460c26?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>urmapapi</title>
		<link>http://apiblog.urmap.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://apiblog.urmap.com/osd.xml" title="urmapapi" />
	<atom:link rel='hub' href='http://apiblog.urmap.com/?pushpress=hub'/>
		<item>
		<title>滑鼠點擊地圖上任意一處取得經緯度</title>
		<link>http://apiblog.urmap.com/2009/01/14/getlatlng/</link>
		<comments>http://apiblog.urmap.com/2009/01/14/getlatlng/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 04:12:21 +0000</pubDate>
		<dc:creator>urmapapi</dc:creator>
				<category><![CDATA[API問題]]></category>

		<guid isPermaLink="false">http://apiblog.urmap.com/?p=158</guid>
		<description><![CDATA[1. 地圖綁上MouseDown事件, 每次點擊地圖後會回傳event及latlng兩個參數 2. 再透過lat()及lng()兩個函式分別取得緯度及經度 function init() { var map = new UMap(document.getElementById('map')); map.centerAndZoom(new ULatLng(25.035405, 121.520255), 9); // 地圖綁上MouseDown事件, 每次點擊地圖回傳Event及latlng兩個參數 map.addListener('mousedown', function(e, latlng){ var inputs = document.getElementsByTagName('INPUT'); inputs[0].value = latlng.lat(); // 取得的緯度值丟入第一個input text inputs[1].value = latlng.lng(); // 取得的經度值丟入第二個input text }); } 觀看範例<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=158&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>1. 地圖綁上MouseDown事件, 每次點擊地圖後會回傳event及latlng兩個參數<br />
2. 再透過lat()及lng()兩個函式分別取得緯度及經度<br />
</p>
<pre class="brush: jscript;">
function init() {
	var map = new UMap(document.getElementById('map'));
	map.centerAndZoom(new ULatLng(25.035405, 121.520255), 9);
	// 地圖綁上MouseDown事件, 每次點擊地圖回傳Event及latlng兩個參數
	map.addListener('mousedown', function(e, latlng){
		var inputs = document.getElementsByTagName('INPUT');
		inputs[0].value = latlng.lat(); // 取得的緯度值丟入第一個input text
		inputs[1].value = latlng.lng(); // 取得的經度值丟入第二個input text
	});
}
</pre>
<p><a href="http://apiblog.urmap.com/wp-content/uploads/2009/01/getlatlng.html" target="_blank">觀看範例</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/urmapapi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/urmapapi.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/urmapapi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/urmapapi.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/urmapapi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/urmapapi.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/urmapapi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/urmapapi.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/urmapapi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/urmapapi.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/urmapapi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/urmapapi.wordpress.com/158/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/urmapapi.wordpress.com/158/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/urmapapi.wordpress.com/158/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=158&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://apiblog.urmap.com/2009/01/14/getlatlng/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db30f2ba5f1178826ef0636206c579ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bingo</media:title>
		</media:content>
	</item>
		<item>
		<title>隨需載入UrMap API (include on demand)</title>
		<link>http://apiblog.urmap.com/2008/12/29/urmap-include-on-demand/</link>
		<comments>http://apiblog.urmap.com/2008/12/29/urmap-include-on-demand/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 10:35:07 +0000</pubDate>
		<dc:creator>urmapapi</dc:creator>
				<category><![CDATA[API問題]]></category>

		<guid isPermaLink="false">http://apiblog.urmap.com/?p=149</guid>
		<description><![CDATA[有時候有些網頁不需要在一開始就載入urmap api，有可能是使用者觸發某個動作才要顯示地圖，這時候用原本取得API的方式(document.write)就無法作到include on demand，因此我寫了一個小程式，經過壓縮之後只有1.6kb。接下來你只要呼叫 loadUMap(); 就可以顯示URMAP地圖了。 這之js檔的參數跟你在取得urmap api時所下的參數一模一樣，同樣你必須取得API key才能夠使用這隻js檔(取得UrMap API sn)，若在載入完成之後要做你自定義的動作，可以再傳參數callback。例如： loadUMap(showMap); 像這樣:點我顯示地圖 範例檔案連結↗ http://api.urmap.com/js/loadUMap.php?key=xxxxxx<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=149&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>有時候有些網頁不需要在一開始就載入urmap api，有可能是使用者觸發某個動作才要顯示地圖，這時候用原本取得API的方式(document.write)就無法作到include on demand，因此我寫了一個小程式，經過壓縮之後只有1.6kb。接下來你只要呼叫<span id="more-149"></span></p>
<pre class="brush: jscript;">
loadUMap();
</pre>
<p>就可以顯示URMAP地圖了。</p>
<p>這之js檔的參數跟你在取得urmap api時所下的參數一模一樣，同樣你必須取得API key才能夠使用這隻js檔(<a href="http://www.urmap.com/SearchEngine/api/signup.html" target="_blank">取得UrMap API sn</a>)，若在載入完成之後要做你自定義的動作，可以再傳參數callback。例如：</p>
<pre class="brush: jscript;">
loadUMap(showMap);
</pre>
<p>像這樣:<button>點我顯示地圖</button></p>
<p><a href="http://apiblog.urmap.com/wp-content/uploads/2008/12/displayumap.html" target="_blank">範例檔案連結↗</a></p>
<p><a href="http://api.urmap.com/js/loadUMap.php?key=xxxxxx">http://api.urmap.com/js/loadUMap.php?key=xxxxxx</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/urmapapi.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/urmapapi.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/urmapapi.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/urmapapi.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/urmapapi.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/urmapapi.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/urmapapi.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/urmapapi.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/urmapapi.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/urmapapi.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/urmapapi.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/urmapapi.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/urmapapi.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/urmapapi.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=149&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://apiblog.urmap.com/2008/12/29/urmap-include-on-demand/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db30f2ba5f1178826ef0636206c579ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bingo</media:title>
		</media:content>
	</item>
		<item>
		<title>UMarker enableDraging</title>
		<link>http://apiblog.urmap.com/2008/12/17/umarker-enabledraging/</link>
		<comments>http://apiblog.urmap.com/2008/12/17/umarker-enabledraging/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 08:45:01 +0000</pubDate>
		<dc:creator>urmapapi</dc:creator>
				<category><![CDATA[API問題]]></category>

		<guid isPermaLink="false">http://apiblog.urmap.com/?p=145</guid>
		<description><![CDATA[enableDraging 讓地標設為可拖拉，透過增加監聽函式addListener 榜定dragging 與 dragend事件，可以進階控制UMarker被拖動時的動作。 function createMarker(point) { var marker = new UMarker(point, myIcon); marker.addListener('dragging', function(e, mkr, latlng) { //marker.openInfoWindow('Hello!'); document.getElementById('log').innerHTML = '正在拖拉：'+latlng.toUrlString(); }); marker.addListener('dragend', function(e, mkr, latlng) { //marker.openInfoWindow('Hello!'); document.getElementById('log').innerHTML = '拖拉結束：'+latlng.toUrlString(); }); return marker; } marker = createMarker(map.getCenter()); map.addOverlay(marker); marker.enableDragging(); 觀看範例: http://www.urmap.com/SearchEngine/api/documentation/enableDraging.html<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=145&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>enableDraging 讓地標設為可拖拉，透過增加監聽函式addListener 榜定dragging 與 dragend事件，可以進階控制UMarker被拖動時的動作。</p>
<pre class="brush: jscript;">

        function createMarker(point) {
          var marker = new UMarker(point, myIcon);
          marker.addListener('dragging', function(e, mkr, latlng) {
            //marker.openInfoWindow('Hello!');
            document.getElementById('log').innerHTML = '正在拖拉：'+latlng.toUrlString();
          });
          marker.addListener('dragend', function(e, mkr, latlng) {
            //marker.openInfoWindow('Hello!');
            document.getElementById('log').innerHTML = '拖拉結束：'+latlng.toUrlString();
          });
          return marker;
        }

        marker = createMarker(map.getCenter());
        map.addOverlay(marker);
        marker.enableDragging();
</pre>
<p>觀看範例: <a href="http://www.urmap.com/SearchEngine/api/documentation/enableDraging.html">http://www.urmap.com/SearchEngine/api/documentation/enableDraging.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/urmapapi.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/urmapapi.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/urmapapi.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/urmapapi.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/urmapapi.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/urmapapi.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/urmapapi.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/urmapapi.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/urmapapi.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/urmapapi.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/urmapapi.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/urmapapi.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/urmapapi.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/urmapapi.wordpress.com/145/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=145&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://apiblog.urmap.com/2008/12/17/umarker-enabledraging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db30f2ba5f1178826ef0636206c579ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bingo</media:title>
		</media:content>
	</item>
		<item>
		<title>UMarker triggerEvent</title>
		<link>http://apiblog.urmap.com/2008/12/17/umarker-triggerevent/</link>
		<comments>http://apiblog.urmap.com/2008/12/17/umarker-triggerevent/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 08:38:08 +0000</pubDate>
		<dc:creator>urmapapi</dc:creator>
				<category><![CDATA[API問題]]></category>

		<guid isPermaLink="false">http://apiblog.urmap.com/?p=139</guid>
		<description><![CDATA[triggerEvent可以讓你直接觸發marker上自定義的監聽事件，通常會做一個地標列表列出所有的marker，當點選列表時觸發原本榜定在marker上的事件。 var map = new UMap(document.getElementById('map')); map.setControlType(U_FULL_CONTROL); map.centerAndZoom(new ULatLng(25.035405, 121.520255), 9); // 函式：用來產生一個會顯示指定號碼在訊息視窗中的地標 function createMarker(point, number) { var marker = new UMarker(point); marker.setMouseonInfo('label:'+number, 'desc:'+number); var html = '地標 #&#60;b&#62;' + number + ''; marker.addListener('click', function() { marker.openInfoWindow(html); }); return marker; } // 加入十個隨機產生的地標 var bounds = map.getBounds(); var width = bounds.getNorthEast().lng() - bounds.getSouthWest().lng(); var height [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=139&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>triggerEvent可以讓你直接觸發marker上自定義的監聽事件，通常會做一個地標列表列出所有的marker，當點選列表時觸發原本榜定在marker上的事件。</p>
<pre class="brush: jscript;">
        var map = new UMap(document.getElementById('map'));
        map.setControlType(U_FULL_CONTROL);
        map.centerAndZoom(new ULatLng(25.035405, 121.520255), 9);

        // 函式：用來產生一個會顯示指定號碼在訊息視窗中的地標
        function createMarker(point, number) {
          var marker = new UMarker(point);
          marker.setMouseonInfo('label:'+number, 'desc:'+number);
          var html = '地標 #&lt;b&gt;' + number + '';
          marker.addListener('click', function() {
            marker.openInfoWindow(html);
          });
          return marker;
        }

        // 加入十個隨機產生的地標
        var bounds = map.getBounds();
        var width = bounds.getNorthEast().lng() - bounds.getSouthWest().lng();
        var height = bounds.getNorthEast().lat() - bounds.getSouthWest().lat();
        for (var i = 0; i &amp;lt; 10; i++) {
          var point = new ULatLng(bounds.getSouthWest().lat() + height * Math.random(), bounds.getSouthWest().lng() + width * Math.random());
          var marker = createMarker(point, i+1);
          map.addOverlay(marker);

          var a = document.createElement(&amp;#039;a&amp;#039;);
          a.href=&amp;#039;#&amp;#039;;
          a.innerHTML = marker.label;
          a.onclick = (function(m){
          	return function(){
          		m.triggerEvent(&amp;#039;click&amp;#039;);
          	};
          })(marker);
          document.getElementById(&amp;#039;list&amp;#039;).appendChild(a);
          document.getElementById(&amp;#039;list&amp;#039;).appendChild(document.createTextNode(&amp;#039;　&amp;#039;));
</pre>
<p>觀看範例: <a href="http://www.urmap.com/SearchEngine/api/documentation/marker_triggerEvent.html">http://www.urmap.com/SearchEngine/api/documentation/marker_triggerEvent.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/urmapapi.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/urmapapi.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/urmapapi.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/urmapapi.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/urmapapi.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/urmapapi.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/urmapapi.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/urmapapi.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/urmapapi.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/urmapapi.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/urmapapi.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/urmapapi.wordpress.com/139/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/urmapapi.wordpress.com/139/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/urmapapi.wordpress.com/139/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=139&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://apiblog.urmap.com/2008/12/17/umarker-triggerevent/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db30f2ba5f1178826ef0636206c579ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bingo</media:title>
		</media:content>
	</item>
		<item>
		<title>如何更改地標mouse on訊息視窗的style?</title>
		<link>http://apiblog.urmap.com/2008/12/15/%e5%a6%82%e4%bd%95%e6%9b%b4%e6%94%b9%e5%9c%b0%e6%a8%99mouse-on%e8%a8%8a%e6%81%af%e8%a6%96%e7%aa%97%e7%9a%84style/</link>
		<comments>http://apiblog.urmap.com/2008/12/15/%e5%a6%82%e4%bd%95%e6%9b%b4%e6%94%b9%e5%9c%b0%e6%a8%99mouse-on%e8%a8%8a%e6%81%af%e8%a6%96%e7%aa%97%e7%9a%84style/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 08:39:26 +0000</pubDate>
		<dc:creator>urmapapi</dc:creator>
				<category><![CDATA[API問題]]></category>

		<guid isPermaLink="false">http://apiblog.urmap.com/?p=109</guid>
		<description><![CDATA[CSS /** MouseOnDiv 區塊 **/ .UMarkerMouseOnDiv{ position: absolute; top:0px; width:120px; z-index:1; font:12px tahoma; display:none; overflow:hidden; opacity:0.8; filter:alpha(opacity:80); border: 1px solid #0099FF; } /** MouseOnDiv 標題 **/ .UMarkerMouseOnDivName{ font-size: 13px; font-weight: bold; color: #FFFFFF; background-image: url(UMarkerTop.gif); background-repeat: repeat-x; background-position: left bottom; background-color: #0f69fe; border: 1px solid #FFFFFF; padding-top: 1px; padding-right: 3px; padding-bottom: 5px; padding-left: 3px; } [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=109&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div style="width:600px;margin:0 0 20px;">
<div style="width:100%;">
<div style="width:50%;text-align:center;float:left;">
					<a href="http://apiblog.urmap.com/wp-content/uploads/mouseonDiv/Publish/api2.0.html" target="_blank"><img src="http://apiblog.urmap.com/wp-content/uploads/2008/12/mouseondiv_blue.gif" width="295" height="170" style="display:block;" /></a>
				</div>
<div style="width:50%;text-align:center;float:left;">
					<a href="http://apiblog.urmap.com/wp-content/uploads/mouseonDiv/Publish/api2.0_orange.html" target="_blank"><img src="http://apiblog.urmap.com/wp-content/uploads/2008/12/mouseondiv_orange.gif" width="295" height="170" style="display:block;" /></a>
				</div>
<div style="clear:both;"></div>
</p></div>
<div style="width:100%;">
<div style="width:50%;text-align:center;float:left;">
					<a href="http://apiblog.urmap.com/wp-content/uploads/mouseonDiv/Publish/api2.0_black.html" target="_blank"><img src="http://apiblog.urmap.com/wp-content/uploads/2008/12/mouseondiv_black.gif" width="295" height="160" style="display:block;" /></a>
				</div>
<div style="width:50%;text-align:center;float:left;">
					<a href="http://apiblog.urmap.com/wp-content/uploads/mouseonDiv/Publish/api2.0_purple.html" target="_blank"><img src="http://apiblog.urmap.com/wp-content/uploads/2008/12/mouseondiv_purple.gif" width="295" height="160" style="display:block;" /></a>
				</div>
<div style="clear:both;"></div>
</p></div>
<div style="width:100%;">
<div style="width:50%;text-align:center;float:left;">
					<a href="http://apiblog.urmap.com/wp-content/uploads/mouseonDiv/Publish/api2.0_green.html" target="_blank"><img src="http://apiblog.urmap.com/wp-content/uploads/2008/12/mouseondiv_green.gif" width="295" height="170" style="display:block;" /></a>
				</div>
<div style="width:50%;text-align:center;float:left;">
					<a href="http://apiblog.urmap.com/wp-content/uploads/mouseonDiv/Publish/api2.0_red.html" target="_blank"><img src="http://apiblog.urmap.com/wp-content/uploads/2008/12/mouseondiv_red.gif" width="295" height="170" style="display:block;" /></a>
				</div>
<div style="clear:both;"></div>
</p></div>
</p></div>
<p><b>CSS</b></p>
<pre class="brush: css;">
/** MouseOnDiv 區塊 **/
.UMarkerMouseOnDiv{
	position: absolute;
	top:0px;
	width:120px;
	z-index:1;
	font:12px tahoma;
	display:none;
	overflow:hidden;
	opacity:0.8;
	filter:alpha(opacity:80);
	border: 1px solid #0099FF;
}
/** MouseOnDiv 標題 **/
.UMarkerMouseOnDivName{
	font-size: 13px;
	font-weight: bold;
	color: #FFFFFF;
	background-image: url(UMarkerTop.gif);
	background-repeat: repeat-x;
	background-position: left bottom;
	background-color: #0f69fe;
	border: 1px solid #FFFFFF;
	padding-top: 1px;
	padding-right: 3px;
	padding-bottom: 5px;
	padding-left: 3px;
}
/** MouseOnDiv 內容 **/
.UMarkerMouseOnDivDesc{
	padding:1px 10px;
	background-color:#FFFFFF;
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/urmapapi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/urmapapi.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/urmapapi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/urmapapi.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/urmapapi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/urmapapi.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/urmapapi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/urmapapi.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/urmapapi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/urmapapi.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/urmapapi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/urmapapi.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/urmapapi.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/urmapapi.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=109&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://apiblog.urmap.com/2008/12/15/%e5%a6%82%e4%bd%95%e6%9b%b4%e6%94%b9%e5%9c%b0%e6%a8%99mouse-on%e8%a8%8a%e6%81%af%e8%a6%96%e7%aa%97%e7%9a%84style/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db30f2ba5f1178826ef0636206c579ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bingo</media:title>
		</media:content>

		<media:content url="http://apiblog.urmap.com/wp-content/uploads/2008/12/mouseondiv_blue.gif" medium="image" />

		<media:content url="http://apiblog.urmap.com/wp-content/uploads/2008/12/mouseondiv_orange.gif" medium="image" />

		<media:content url="http://apiblog.urmap.com/wp-content/uploads/2008/12/mouseondiv_black.gif" medium="image" />

		<media:content url="http://apiblog.urmap.com/wp-content/uploads/2008/12/mouseondiv_purple.gif" medium="image" />

		<media:content url="http://apiblog.urmap.com/wp-content/uploads/2008/12/mouseondiv_green.gif" medium="image" />

		<media:content url="http://apiblog.urmap.com/wp-content/uploads/2008/12/mouseondiv_red.gif" medium="image" />
	</item>
		<item>
		<title>URMAP API 2.0 推出</title>
		<link>http://apiblog.urmap.com/2008/12/12/urmap-api-20/</link>
		<comments>http://apiblog.urmap.com/2008/12/12/urmap-api-20/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 04:13:16 +0000</pubDate>
		<dc:creator>urmapapi</dc:creator>
				<category><![CDATA[版本發佈]]></category>

		<guid isPermaLink="false">http://apiblog.urmap.com/?p=90</guid>
		<description><![CDATA[URMAP API 2.0版大幅更新及改善了許多功能，並且相容於前一版。 為了提供更快速、可靠的API服務，取得API的網址由原本的http://www.urmap.com/SearchEngine/api/getapi.jsp 改成 http://api.urmap.com/js/getapi.php， 原本的API路徑雖然還會繼續服務，但是不再提供更新，若要取得最新的API請將網址改為新的API路徑。建議不管您是否想更換新的API，都要將路徑改為新的API路徑，以取得更快速更可靠的服務。（URMAP API 2.0 Document） 雖經過一連串的測試，但難免可能會有疏漏，若有bug請留言或寄信至bingo.yan@olemap.com，更新簡介如下： 出圖速度更快，減少等待時間。 增進UMarker的效能，簡化UMarker物件。 UMarker可以拖拉(enableDragging)和取消拖拉(disableDragging)。 增加UMarker的可監聽事件(mouseout, mousedown, mouseup, contextmenu, dragend, draging)。 新增UDom overlay，你可以透過UDom將任何DOM物件(包括Flash)插到指定的經緯度上面(看範例)。 許多人一直期望有的UOverviewControl控制項，能夠在地圖上放入縮略地圖控制項。(看範例) UInfoWindowOptions 更豐富的訊息視窗，且可以設定分頁內容，infoWindow不再只有單調的內容。(看範例) addStaticOverlay 可以在地圖上加入一個靜態的套疊物件(不隨地圖移動)。(看範例) 使用UOverlayManager來管理大量地標，透過該物件來管理地標，可以有效的控制在地圖上顯示的地標，例如可以設定最大和最小顯示層級，拖動地圖和縮放地圖時會判斷地標是否在可是範圍之內，若沒有則不顯示，避免過多的地標造成頁面loading過重。另外當開啟autoMergeMarker功能時，會將鄰近的地標合併，避免過多的地標重疊。(看範例) ULatLng 可直接計算與另外一個ULatLng的距離。 相容於Google Chrome。 更多的範例請參考UrMap API BLOG。<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=90&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>URMAP API 2.0版大幅更新及改善了許多功能，並且相容於前一版。</p>
<p>為了提供更快速、可靠的API服務，取得API的網址由原本的http://www.urmap.com/SearchEngine/api/getapi.jsp 改成 http://api.urmap.com/js/getapi.php， 原本的API路徑雖然還會繼續服務，但是不再提供更新，若要取得最新的API請將網址改為新的API路徑。建議不管您是否想更換新的API，都要將路徑改為新的API路徑，以取得更快速更可靠的服務。（<a href="http://www.urmap.com/SearchEngine/api/documentation/" target="_blank">URMAP API 2.0 Document</a>）</p>
<p>雖經過一連串的測試，但難免可能會有疏漏，若有bug請留言或寄信至<a href="mailto:bingo.yan@olemap.com" target="_blank">bingo.yan@olemap.com</a>，更新簡介如下：</p>
<ol>
<li>出圖速度更快，減少等待時間。</li>
<li>增進UMarker的效能，簡化UMarker物件。</li>
<li>UMarker可以拖拉(enableDragging)和取消拖拉(disableDragging)。</li>
<li>增加UMarker的可監聽事件(mouseout, mousedown, mouseup, contextmenu, dragend, draging)。</li>
<li>新增<a href="http://www.urmap.com/SearchEngine/api/documentation/#UDomReference" target="_blank">UDom overlay</a>，你可以透過UDom將任何DOM物件(包括Flash)插到指定的經緯度上面<a href="http://www.urmap.com/SearchEngine/api/documentation/#UDomExample" target="_blank">(看範例)</a>。</li>
<li>許多人一直期望有的<a href="http://www.urmap.com/SearchEngine/api/documentation/#UOverviewMapControl" target="_blank">UOverviewControl控制項</a>，能夠在地圖上放入縮略地圖控制項。<a href="http://www.urmap.com/SearchEngine/api/documentation/#UOverviewMapControlExample" target="_blank">(看範例)</a></li>
<li>UInfoWindowOptions 更豐富的訊息視窗，且可以設定分頁內容，infoWindow不再只有單調的內容。<a href="http://www.urmap.com/SearchEngine/api/documentation/#UOverviewMapControlExample" target="_blank">(看範例)</a></li>
<li>addStaticOverlay 可以在地圖上加入一個靜態的套疊物件(不隨地圖移動)。<a href="http://www.urmap.com/SearchEngine/api/documentation/#addStaticOverlay" target="_blank">(看範例)</a></li>
<li>使用<a href="http://www.urmap.com/SearchEngine/api/documentation/#UOverlayManagerReference" target="_blank">UOverlayManager</a>來管理大量地標，透過該物件來管理地標，可以有效的控制在地圖上顯示的地標，例如可以設定最大和最小顯示層級，拖動地圖和縮放地圖時會判斷地標是否在可是範圍之內，若沒有則不顯示，避免過多的地標造成頁面loading過重。另外當開啟autoMergeMarker功能時，會將鄰近的地標合併，避免過多的地標重疊。<a href="http://www.urmap.com/SearchEngine/api/documentation/UOverlayManagerAutoMergeMarker.html" target="_blank">(看範例)</a></li>
<li>ULatLng 可直接計算與另外一個ULatLng的距離。</li>
<li>相容於Google Chrome。</li>
</ol>
<p>更多的範例請參考<a href="http://apiblog.urmap.com/" target="_blank">UrMap API BLOG</a>。</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/urmapapi.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/urmapapi.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/urmapapi.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/urmapapi.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/urmapapi.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/urmapapi.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/urmapapi.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/urmapapi.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/urmapapi.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/urmapapi.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/urmapapi.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/urmapapi.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/urmapapi.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/urmapapi.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=90&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://apiblog.urmap.com/2008/12/12/urmap-api-20/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db30f2ba5f1178826ef0636206c579ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bingo</media:title>
		</media:content>
	</item>
		<item>
		<title>如果我想讓使用者點選「板橋市」、「新店市」、「信義區」、「士林區」就會帶到該地方 並且縮放到合適的level，我該怎麼做?</title>
		<link>http://apiblog.urmap.com/2008/09/22/upolygon/</link>
		<comments>http://apiblog.urmap.com/2008/09/22/upolygon/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 09:57:16 +0000</pubDate>
		<dc:creator>urmapapi</dc:creator>
				<category><![CDATA[API問題]]></category>

		<guid isPermaLink="false">http://apiblog.urmap.com/?p=48</guid>
		<description><![CDATA[觀看範例 CSS #map { width: 500px; height: 400px; border: 1px solid black; } select.select-field { font-size: 12px; color: #333; border: 1px solid #333; margin: 0px 0px 10px 0px; padding: 2px; } HTML 板橋市 新店市 信義區 士林區 &#60;div id=&#34;map&#34;&#62;&#60;/div&#62; 查詢某個地點的經緯度 按下滑鼠右鍵，出現右鍵選單，選擇查詢經緯度，拷貝經緯度，如下圖。 Javascript // 宣告一陣列儲存矩形範圍西南角及東北角的經緯度 var locations = [{SWLat:24.955531122809986,SWLng:121.35407679576154, NELat:25.066144696138256,NELng:121.55485406951051}, {SWLat:24.88251262907,SWLng:121.434947311581, NELat:24.9921441648787,NELng:121.6375724412087}, {SWLat:24.978025822536974,SWLng:121.47252509421136, NELat:25.087885910040874,NELng:121.67629414994528}, {SWLat:25.08071599866579,SWLng:121.42961783656162, NELat:25.189774015918026,NELng:121.63129496303368}]; var [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=48&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://apiblog.urmap.com/wp-content/uploads/2008/09/upolygon.html" target="_blank">觀看範例</a></p>
<p><strong>CSS</strong></p>
<pre class="brush: css;">
#map {
	width: 500px;
	height: 400px;
	border: 1px solid black;
}
select.select-field {
	font-size: 12px;
	color: #333;
	border: 1px solid #333;
	margin: 0px 0px 10px 0px;
	padding: 2px;
}
</pre>
<p><strong>HTML</strong></p>
<pre class="brush: xml;">

		板橋市
		新店市
		信義區
		士林區

	&lt;div id=&quot;map&quot;&gt;&lt;/div&gt;
</pre>
<p><strong>查詢某個地點的經緯度</strong><br />
按下滑鼠右鍵，出現右鍵選單，選擇查詢經緯度，拷貝經緯度，如下圖。<br />
<img class="attachment wp-att-73 alignleft" src="http://apiblog.urmap.com/wp-content/uploads/2008/09/query_lat_lng1.jpg" alt="查詢經緯度" width="280" height="280" /></p>
<div style="width:500px;float:left;margin:10px 0 0;"><strong>Javascript</strong></div>
<pre class="brush: jscript;">
// 宣告一陣列儲存矩形範圍西南角及東北角的經緯度
var locations = [{SWLat:24.955531122809986,SWLng:121.35407679576154,
				NELat:25.066144696138256,NELng:121.55485406951051},
				{SWLat:24.88251262907,SWLng:121.434947311581,
				NELat:24.9921441648787,NELng:121.6375724412087},
				{SWLat:24.978025822536974,SWLng:121.47252509421136,
				NELat:25.087885910040874,NELng:121.67629414994528},
				{SWLat:25.08071599866579,SWLng:121.42961783656162,
				NELat:25.189774015918026,NELng:121.63129496303368}];
var map;

function getSelectedIndex() {
	var options = document.getElementsByTagName('option');
	var total = options.length;
	for (var i=0; i&amp;lt;total; i++) {
		if (options[i].selected) {
			return options[i].value;
		}
	}
}

function init() {
	map = new UMap(document.getElementById(&amp;#039;map&amp;#039;));
	loadMap();
}

function loadMap() {
	var selectedIndex = getSelectedIndex();
	// 建立一個經緯度的矩形範圍
	var bounds = new UBounds(new ULatLng(locations[selectedIndex].SWLat, locations[selectedIndex].SWLng),
				new ULatLng(locations[selectedIndex].NELat, locations[selectedIndex].NELng));
	// 取得這個矩形範圍的中心點坐標(經緯度)
	var centerLatLng = bounds.getCenter();
	// 取得能完全包含傳入的矩形範圍的zoomLevel 值
	var zoomLevel = map.getBoundsZoomLevel(bounds) + 2;
	// 將地圖的中心點移動至指定的經緯度坐標並縮放到指定的zoomLevel
	map.centerAndZoom(new ULatLng(centerLatLng.lat(), centerLatLng.lng()), zoomLevel);
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/urmapapi.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/urmapapi.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/urmapapi.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/urmapapi.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/urmapapi.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/urmapapi.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/urmapapi.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/urmapapi.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/urmapapi.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/urmapapi.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/urmapapi.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/urmapapi.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/urmapapi.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/urmapapi.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=48&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://apiblog.urmap.com/2008/09/22/upolygon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db30f2ba5f1178826ef0636206c579ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bingo</media:title>
		</media:content>

		<media:content url="http://apiblog.urmap.com/wp-content/uploads/2008/09/query_lat_lng1.jpg" medium="image">
			<media:title type="html">查詢經緯度</media:title>
		</media:content>
	</item>
		<item>
		<title>如何讓右鍵選單跳出?而且選單中其中一個按鈕是新增marker?</title>
		<link>http://apiblog.urmap.com/2008/09/22/context_menu/</link>
		<comments>http://apiblog.urmap.com/2008/09/22/context_menu/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 08:20:41 +0000</pubDate>
		<dc:creator>urmapapi</dc:creator>
				<category><![CDATA[API問題]]></category>

		<guid isPermaLink="false">http://apiblog.urmap.com/?p=36</guid>
		<description><![CDATA[觀看範例 CSS #map { width: 500px; height: 400px; border: 1px solid black; } ul#context-menu { font-size: 12px; list-style: none; border-top: 1px solid #333; border-left: 1px solid #333; border-right: 1px solid #333; display: none; margin: 0px; position: absolute; } ul#context-menu li.tab { width: 80px; background-color: #ccc; color: #333; text-align: center; line-height: 1.6; border-bottom: 1px solid #333; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=36&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://apiblog.urmap.com/wp-content/uploads/2008/09/context_menu.html" target="_blank">觀看範例</a></p>
<p><strong>CSS</strong></p>
<pre class="brush: css;">
#map {
	width: 500px;
	height: 400px;
	border: 1px solid black;
}
ul#context-menu {
	font-size: 12px;
	list-style: none;
	border-top: 1px solid #333;
	border-left: 1px solid #333;
	border-right: 1px solid #333;
	display: none;
	margin: 0px;
	position: absolute;
}
ul#context-menu li.tab {
	width: 80px;
	background-color: #ccc;
	color: #333;
	text-align: center;
	line-height: 1.6;
	border-bottom: 1px solid #333;
	margin: 0px 0px 0px -40px;
	#margin: 0px;
	display: block;
	cursor: pointer;
}
ul#context-menu li.tab:hover {
	background-color: #333;
	color: #fff;
}
</pre>
<p><strong>HTML</strong></p>
<pre class="brush: xml;">

    &lt;div id=&quot;map&quot;&gt;&lt;/div&gt;
    &lt;ul id=&quot;context-menu&quot;&gt;
        &lt;li class=&quot;tab&quot;&gt;Add Marker&lt;/li&gt;
        &lt;li class=&quot;tab&quot;&gt;Close&lt;/li&gt;
    &lt;/ul&gt;
</pre>
<p><strong>產生地圖及bind a contextmenu event into the map</strong></p>
<pre class="brush: jscript;">
var map;
var MouseObj = {};
// 自訂 the icon of the marker
var icon = new UIcon();
icon.image = 'http://maps.google.com/intl/en_us/mapfiles/cb/man_arrow-0.png';
icon.iconWidth = 49;
icon.iconHeight = 52;
icon.iconAnchor = new UPoint(32, 32);

function loadMap() {
	var mapDiv = document.getElementById('map');
	map = new UMap(mapDiv);
	var centerLatLng = new ULatLng(25.035405, 121.520255);
	map.centerAndZoom(centerLatLng, 8);
	// Bind a contextmenu event into the div map to show the context menu.
	addEvent(mapDiv, 'contextmenu', showContextMenu);
}

function addEvent(obj, event, fn) {
	if (obj.addEventListener) { // For Firefox, Opera, Safari
		obj.addEventListener(event, fn, false);
	} else if (obj.attachEvent) { // For IE
		obj.attachEvent('on'+event, fn);
	}
}
</pre>
<p><strong>自訂右鍵選單及設定選單位置</strong></p>
<pre class="brush: jscript;">
/********************
隱藏預設的右鍵選單
********************/
function cancelDefault(e) {
	// For IE
	if(window.event)
		window.event.returnValue = false;
	// For Firefox
	if(e &amp;amp;amp;&amp;amp;amp; e.preventDefault)
		e.preventDefault();
}

/*********
選單位置
*********/
function getMousePos(e) {
	if (e.pageX || e.pageY){ // this doesn't work on IE6!! (works on FF,Moz,Opera7)
		MouseObj.x = e.pageX ;
		MouseObj.y = e.pageY;
	} else if (e.clientX || e.clientY){
		MouseObj.x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
		MouseObj.y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
	}
}

/*********
右鍵選單
*********/
function showContextMenu(e) {
	var ev = e || window.event;
	cancelDefault(ev);
	getMousePos(ev);
	var contextMenu = document.getElementById('context-menu');
	contextMenu.style.display = 'block';
	contextMenu.style.left = MouseObj.x + 'px';
	contextMenu.style.top = MouseObj.y + 'px';
}
</pre>
<p><strong>選單按紐</strong></p>
<pre class="brush: jscript;">
/*********
新增Marker
*********/
function addMarker() {
	var latlngObj = map.transformContainerCoordinatesToLatLng(new UPoint(MouseObj.x, MouseObj.y));
	var marker = new UMarker(new ULatLng(latlngObj.lat(), latlngObj.lng()), icon);
	map.addOverlay(marker);
	closeContextMenu();
}

/*********
關閉選單
*********/
function closeContextMenu() {
	var contextMenu = document.getElementById('context-menu');
	contextMenu.style.display = 'none';
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/urmapapi.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/urmapapi.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/urmapapi.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/urmapapi.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/urmapapi.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/urmapapi.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/urmapapi.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/urmapapi.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/urmapapi.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/urmapapi.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/urmapapi.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/urmapapi.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/urmapapi.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/urmapapi.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=36&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://apiblog.urmap.com/2008/09/22/context_menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db30f2ba5f1178826ef0636206c579ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bingo</media:title>
		</media:content>
	</item>
		<item>
		<title>我不喜歡預設的marker mouseover的style,可以改嗎</title>
		<link>http://apiblog.urmap.com/2008/09/10/setmymarkerinfodivhtml/</link>
		<comments>http://apiblog.urmap.com/2008/09/10/setmymarkerinfodivhtml/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 04:17:34 +0000</pubDate>
		<dc:creator>urmapapi</dc:creator>
				<category><![CDATA[API問題]]></category>

		<guid isPermaLink="false">http://apiblog.urmap.com/index.php/2008/09/10/%e6%88%91%e4%b8%8d%e5%96%9c%e6%ad%a1%e9%a0%90%e8%a8%ad%e7%9a%84marker-mouseover%e7%9a%84style%e5%8f%af%e4%bb%a5%e6%94%b9%e5%97%8e/</guid>
		<description><![CDATA[A：請自己綁定mouseover事件，利用UMarker.getPoint()來取得經緯度座標，並設定marker info的位置。 點我觀看範例 var map; function init() { map = new UMap(document.getElementById('map')); map.centerAndZoom(new ULatLng(25.035405, 121.520255), 9); var mapDiv = document.getElementById('map'); var marker = new UMarker(map.getCenter()); bindMaukerMouseover(marker, 'this is a string!'); map.addOverlay(marker); var marker2 = new UMarker(new ULatLng(25.033405, 121.523255)); bindMaukerMouseover(marker2, 'this is another string!'); map.addOverlay(marker2); //My marker info Div var myMarkerInfoDiv = document.createElement('div'); myMarkerInfoDiv.id = 'myMarkerInfoDiv'; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=30&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A：請自己綁定mouseover事件，利用UMarker.getPoint()來取得經緯度座標，並設定marker info的位置。</p>
<p><a href="http://apiblog.urmap.com/wp-content/uploads/2008/09/myMarkerInfoDiv.html">點我觀看範例</a></p>
<pre class="brush: jscript;">
var map;
function init() {
	map = new UMap(document.getElementById('map'));
	map.centerAndZoom(new ULatLng(25.035405, 121.520255), 9);
	var mapDiv = document.getElementById('map');

	var marker = new UMarker(map.getCenter());
	bindMaukerMouseover(marker, 'this is a string!');
	map.addOverlay(marker);

	var marker2 = new UMarker(new ULatLng(25.033405, 121.523255));
	bindMaukerMouseover(marker2, 'this is another string!');
	map.addOverlay(marker2);

	//My marker info Div
	var myMarkerInfoDiv = document.createElement('div');
	myMarkerInfoDiv.id = 'myMarkerInfoDiv';
	myMarkerInfoDiv.style.cssText = 'width:200px;border:1px solid blue;display:none;position:absolute;background-color:#CCC;';
	document.getElementById('map').appendChild(myMarkerInfoDiv);

}</pre>
<p><strong>榜定marker的mouseover事件</strong></p>
<pre class="brush: jscript;">
function bindMaukerMouseover(mkr, msg){
	mkr.addListener('mouseover', function(){
		var latlng = mkr.getPoint();//取得該座標的經緯度
		var point = map.transformLatLngToContainerCoordinates(latlng);//將經緯度轉成螢幕座標（相對於mapDiv左上角）
		var exX = 15;//x偏差量
		var exY = 10;//y偏差量
		document.getElementById('myMarkerInfoDiv').style.left = (point.x + exX) + 'px';
		document.getElementById('myMarkerInfoDiv').style.top = (point.y + exY) + 'px';
		document.getElementById('myMarkerInfoDiv').style.display = 'block';
		document.getElementById('myMarkerInfoDiv').innerHTML = msg;
	});
	mkr.addListener('mouseout', function(){
		document.getElementById('myMarkerInfoDiv').style.display = 'none';
	});
}</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/urmapapi.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/urmapapi.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/urmapapi.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/urmapapi.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/urmapapi.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/urmapapi.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/urmapapi.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/urmapapi.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/urmapapi.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/urmapapi.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/urmapapi.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/urmapapi.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/urmapapi.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/urmapapi.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/urmapapi.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/urmapapi.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=30&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://apiblog.urmap.com/2008/09/10/setmymarkerinfodivhtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db30f2ba5f1178826ef0636206c579ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bingo</media:title>
		</media:content>
	</item>
		<item>
		<title>API 1.09版推出</title>
		<link>http://apiblog.urmap.com/2008/05/07/release_1_09/</link>
		<comments>http://apiblog.urmap.com/2008/05/07/release_1_09/#comments</comments>
		<pubDate>Wed, 07 May 2008 06:42:55 +0000</pubDate>
		<dc:creator>urmapapi</dc:creator>
				<category><![CDATA[版本發佈]]></category>

		<guid isPermaLink="false">http://apiblog.urmap.com/index.php/2008/05/07/release_1_09/</guid>
		<description><![CDATA[1.09 版 API 的新功能如下： 改善 IE7 使用衛星地圖時的效能 解決 IE 中無法列印 UPolyline 的 bug 解決地圖列印時，zoombar 會留白的 bug 調整地圖框選模式(U_BOX_ACTION)，當框選完畢時框框不會直接消失，要等使用者 click 地圖或移動地圖之後才會消失 UMap 類別新增 mousedown、mouseup、mousemove 等監聽事件的支援 UMap 類別新增 transformLatLngToContainerCoordinates 函式，可將地圖坐標轉換為螢幕坐標 UMarker 類別新增 mousedown、mouseup 等監聽事件的支援 UMap 及 UMarker 類別新增 removeListener、clearListeners 兩種取消註冊監聽函式的新函式 新增 UPolygon 多邊形類別支援，可於地圖上套疊任意多邊形物件 新增 UCircle 圓形類別支援，可於地圖上套疊圓形物件 以上新增功能的詳情請參考API 說明文件<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=24&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>
1.09 版 API 的新功能如下：
</p>
<ol>
<li>改善 IE7 使用衛星地圖時的效能</li>
<li>解決 IE 中無法列印 UPolyline 的 bug</li>
<li>解決地圖列印時，zoombar 會留白的 bug</li>
<li>調整地圖框選模式(U_BOX_ACTION)，當框選完畢時框框不會直接消失，要等使用者 click 地圖或移動地圖之後才會消失</li>
<li>UMap 類別新增 mousedown、mouseup、mousemove 等監聽事件的支援</li>
<li>UMap 類別新增 transformLatLngToContainerCoordinates 函式，可將地圖坐標轉換為螢幕坐標</li>
<li>UMarker 類別新增 mousedown、mouseup 等監聽事件的支援</li>
<li>UMap 及 UMarker 類別新增 removeListener、clearListeners 兩種取消註冊監聽函式的新函式</li>
<li>新增 UPolygon 多邊形類別支援，可於地圖上套疊任意多邊形物件<br /><img src="http://apiblog.urmap.com/wp-content/uploads/2008/05/upolygon.gif" alt="UPolygon" /></li>
<li>新增 UCircle 圓形類別支援，可於地圖上套疊圓形物件<br /><img src="http://apiblog.urmap.com/wp-content/uploads/2008/05/ucircle.gif" alt="UCircle" /></li>
</ol>
<p>
以上新增功能的詳情請參考<a href="http://www.urmap.com/SearchEngine/api/documentation/">API 說明文件</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/urmapapi.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/urmapapi.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/urmapapi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/urmapapi.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/urmapapi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/urmapapi.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/urmapapi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/urmapapi.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/urmapapi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/urmapapi.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/urmapapi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/urmapapi.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/urmapapi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/urmapapi.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/urmapapi.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/urmapapi.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=apiblog.urmap.com&blog=9631537&post=24&subd=urmapapi&ref=&feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://apiblog.urmap.com/2008/05/07/release_1_09/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/db30f2ba5f1178826ef0636206c579ff?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bingo</media:title>
		</media:content>

		<media:content url="http://apiblog.urmap.com/wp-content/uploads/2008/05/upolygon.gif" medium="image">
			<media:title type="html">UPolygon</media:title>
		</media:content>

		<media:content url="http://apiblog.urmap.com/wp-content/uploads/2008/05/ucircle.gif" medium="image">
			<media:title type="html">UCircle</media:title>
		</media:content>
	</item>
	</channel>
</rss>