[Plugin] Google Maps Plugin for WordPress
2006/11/13 01:12 1,752Views
剛剛在「ijliao」那看到了「Google Maps Plugin for WordPress」這個實用的 Plugin, 可以很方便的在 Blog 上面秀出「Google Maps」的地圖, 以後要講地點再也不會描述不清了!
趕快來試一下, 標示出新莊最機車、最容易塞車的路口:
注意: 本站目前已停用這個 Plugin, 改用 UrMap, 所以看不出效果。
對於 FancyTooltips 不相容的問題, 我已經弄出一個改良版了, 詳見這篇文章。
注意: 本 plugin 和 FancyTooltips 相衝, 得修正一下程式碼才行。我說說我的改法, 由於它會和 FancyTooltips 抓取連結的「title」屬性相衝, 因此我將它由抓取「title」屬性改為抓取「rel」屬性, 所以修改後原本使用時指定在「title」必須改成指定在「rel」, 程式碼如下(字體色彩不同的是我改的地方, 請自行比對 plugin 的原始碼):
function googlemaps_anchorTagSearchReplace() {
var thekey = “$googlemaps_googleMapsKey”;
var hrefs = document.getElementsByTagName(”a”);
for (x=0; x<hrefs.length; x++) {
var thehref = hrefs[x];
var theloc = thehref.href;
var relAttribute = String(thehref.getAttribute(’rel’));
if ((theloc.indexOf(’http://maps.google.’)!=-1) &&
(relAttribute.indexOf(’googlemap’)!=-1) ) {
var pcnt = 0;
mapname = ‘googlemap-’+x;
ginfo = relAttribute;
Technorati Tags: WordPress, plugins, Google Maps





7 Comments Add your own
1. Robbin | 2006/11/13 19:21
這個好像還挺好玩的,話說這個路口也是我這幾年最討厭的一個路口啊,總是在上下班時間塞到天荒地老的…..
2. goston | 2006/11/13 19:29
我最近觀察了三個星期, 下班時間週一到週五每天塞, 而且… 完全沒有警察在指揮交通… 實在很扯…
3. Robbin | 2006/11/13 22:10
Goston兄可能離我不會很遠啊,基本上那裡也是我每天必經之地,小弟在湯城工作..
4. goston | 2006/11/13 22:19
@Robbin
我是住在那附近啦… 我在新店工作… @_@
5. Avi Alkalay | 2006/11/14 06:05
I just updated the plugin with the “rel” ideas we discussed here, plus some tons of code cleanup and reorganization.
6. Goston’s Blog &raqu&hellip | 2006/11/14 10:43
[...] 由 ijliao 那得知的這個 Plugin, 在昨天已經介紹過了, 已知這個 Plugin 會和 FancyTooltips 相衝, 在向原開發者反應過後, 原開發者在 plugin 的 option 中增加了要以 link 的 title 屬性或 rel 屬性來運作的選項 (使用 FancyTooltips 的人該選項要打勾)。 [...]
7. 馬修的研究室部落&hellip | 2007/03/13 00:39
[...] 1.Google Maps Plugin for WordPress 2.Google Maps Plugin 3.[Plugin] Google Maps Plugin for WordPress 4.Google Maps Plugin 使用 K2 theme [...]
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed