查看完整版本: 让Google卫星 替你的网站打工[Google Maps Plugin]

siting 2008-10-8 23:45

让Google卫星 替你的网站打工[Google Maps Plugin]

很晚了,但我忍不住向大家推荐一款非常优秀,能够让你的网站更具吸引力的wordpress插件:[url=http://www.simpleseo.cn/wordpress/google-maps-plugin-for-wordpress]Google Maps Plugin for WordPress[/url]。(该插件作者的网站:[url]http://avi.alkalay.net/2006/11/google-maps-plugin-for-wordpress.html[/url])
一、插件介绍
Google Maps Plugin 是一款免费的WordPress插件,它可以在自己的博客上实现Google Maps的地图功能,需要的朋友可以点击这里下载:[url=http://wordpress.org/extend/plugins/google-maps-advanced/google-maps-advanced.zip]Google Maps Plugin for WordPress[/url]。
二、安装方法
[url=http://www.simpleseo.cn/wordpress/google-maps-plugin-for-wordpress]Google Maps Plugin for WordPress插件[/url]的安装方法跟其它的WordPress插件差不多,将插件下载解压到[WORDPRESS_ROOT]/wp-content/plugins目录,然后到wordpress后台的插件管理处激活。
另外,你还需要到这里[url=http://www.google.com/apis/maps/signup.html]http://www.google.com/apis/maps/signup.html[/url],去注册申请Google Maps API key(申请流程非常简单,填入你的网站地址即可),然后将Google Maps API key填写到Google Maps Plugin for WordPress插件的设置页面(如下图)。至此安装完成。
[url=http://www.simpleseo.cn/wp-content/uploads/2008/10/googlemapsplugin1.jpg][img=401,300]http://www.simpleseo.cn/wp-content/uploads/2008/10/googlemapsplugin1-401x300.jpg[/img][/url]google maps,wordpress插件

三、使用方法
(一)简单地图功能,手工新建独立的html页面(不推荐)
1、到[url=http://maps.google.com/maps]http://maps.google.com/maps[/url]去寻找你希望Google Maps默认显示的地区(我选择上海市);
2、选择地图显示模式、卫星显示模式或者综合显示模式;
3、然后点击右上角的“link”按钮,获得html代码([color=#ff00]代码中的ll=31.359501,121.543121参数表示地图所显示的地理位置的座标[/color]);
4、手工新建一个html页面,将刚才的代码填入其中,再将该html页面文件上传到网站。
演示地址:[url=http://howbuycar.com/googlemaps.html]http://howbuycar.com/googlemaps.html[/url] 效果图如下:[url=http://www.simpleseo.cn/wp-content/uploads/2008/10/googlemapsplugin2.jpg][img=425,228]http://www.simpleseo.cn/wp-content/uploads/2008/10/googlemapsplugin2-425x228.jpg[/img][/url]google maps,wordpress插件

(二)复杂地图功能,嵌入到任意文章页面中(推荐)
1、将下面代码在HTML编辑模式下面添加到文章中
<dl [b]title="googlemap;w:100%;h:400"[/b]>
        [color=#0800]<dt><a href="http://maps.google.com/?z=15&ll=-23.550887,-46.631985&om=1">Center of map</a></dt>[/color]
        [color=#0800]<dt><a href="http://maps.google.com/?ll=-23.550592,-46.633122">map</a></dt>[/color]
        [color=#ff0ff]<dd><strong>Center of São Paulo</strong></dd>[/color]
        [color=#0800]<dt><a href="http://maps.google.com/?ll=-23.547563,-46.631041">map</a></dt>[/color]
        [color=#ff0ff]<dd>Flea market</dd>[/color]
        [color=#0800]<dt><a href="http://maps.google.com/?ll=-23.54535,-46.627693" title="marker">map</a></dt>[/color]
        [color=#ff0ff]<dd>Traditional market</dd>[/color]
        [color=#0800]<dt><a href="http://maps.google.com/?ll=-23.54715,-46.637263">balloonless marker</a></dt>[/color]
        [color=#0800]<dt><a href="http://maps.google.com/?ll=-23.555195,-46.635547" title="marker">map</a></dt>[/color]
        [color=#ff0ff]<dd>Japanese town</dd>[/color]
</dl>
演示地址:[url=http://howbuycar.com/google-maps]http://howbuycar.com/google-maps[/url] 效果图如下:[url=http://howbuycar.com/google-maps][img=294,300]http://www.simpleseo.cn/wp-content/uploads/2008/10/googlemapsplugin3-294x300.jpg[/img][/url]google maps wordpress插件



2、参数说明googlemap以下所有参数均添加在googlemap之后,用 ; 号隔开;nocontrol or nocontrols是否添加地图缩放和地图位置控制;nomarker or nomarkers是否显示marker位标记;w:[i]SIZE_IN_PIXELS[/i] and h:[i]SIZE_IN_PIXELS[/i]显示地图的尺寸大小;w:[i]PERCENT%[/i] and h:[i]PERCENT%[/i]控制地图相对于屏幕的高度和宽度;下面是上述参数的使用范例:
googlemapRenders a map with controls, marker an default sizes, as specified in the plugin’s admin page, under WP Options.googlemap;nocontrols;w:300;h:200Renders a 300×200 map with marker but no zoom controls.googlemap;nomarker;nocontrols;w:100;h:100Renders a small 100×100 map without marker and zoom controls.googlemap;nomarker;nocontrols;w:100%;h:300Renders a maps that fills the full width available with a 300 pixels height, without markers and zoom controls.OK,介绍完了,大家可以利用该插件,在about页面,准确地显示出自己的所在地;也可以在旅游之后,对自己所游玩的景点,以地图的形式介绍给大家。自由发挥吧,希望这个[url=http://www.simpleseo.cn/wordpress/google-maps-plugin-for-wordpress]Google Maps插件[/url]让你的网站更加生动有趣,更加有吸引力^_^

[i]PS.本人的英文水平很烂,写这篇文章花费了不少时间,如果转载,请注明出处;)[/i]
[i]http://www.simpleseo.cn/wordpress/google-maps-plugin-for-wordpress
[/i]

scutdk 2008-10-8 23:56

谢谢分享

siting 2008-10-9 09:32

这篇文章是从自己的博客上直接复制过来的,但是看过的朋友,都说“应该很有趣”,看来目前还没有人去尝试,鸣~:'(

yang_hui1986527 2008-10-9 09:59

功能强大的插件,感谢分享。

凡高的耳朵 2008-10-9 13:51

会不会增加网站负担啊?

timon 2008-10-9 15:10

试试

siting 2008-10-9 22:16

只要是插件,总归要占资源的,这个插件吃资源的程度怎么样我也不清楚,我没有安装到我自己的博客,而是装到一个垃圾站上做的试验。

lnd 2008-10-9 22:37

谢谢分享

waiwai 2008-10-10 00:30

兄弟,图片都看不到:(

soffi 2008-10-10 12:25

:loveliness: :loveliness: 兄弟图片看不到

siting 2008-10-13 22:26

咦, 我能看到图片呀,是不是网速太慢,还没能打开。
页: [1]
查看完整版本: 让Google卫星 替你的网站打工[Google Maps Plugin]