wordpress中Google Map V3 for IDN 插件的使用

来源:互联网 发布:当淘宝店主有什么好 编辑:程序博客网 时间:2024/06/09 09:29

一、配置

插件下载地址:http://wordpress.org/extend/plugins/google-map-v3-for-idn/

插件安装成功之后,可在"settings" 下找到“Google Map V3 for IDN ” 的配置。见下图

在配置中需要输入GoogleMap 的API key 你可以通过:http://code.google.com/apis/maps/signup.html 该地址申请并得到这个key.

在配置完成后,我们可以在“appearance”下的"widgets"中找到该组件。见下图:

二、如何使用?

如果你的主题支持Widgets,那么可以直接将Google Map V3 IDN 小工具拖过去。见下图:

如果需要在Post或Pages中使用,你可以使用如下代码:

[GMV directionsto="50, avenue des Champs-Elysées 75020 Paris France"content="50,

 avenue des Champs-Elysées 75020 Paris" For directions enter your address below"address="17 square des Cardeurs 75020 Paris France"]

 GMV中用到的参数见官方说明:

The shortcode name is GMV and here are the options.

  • lat [int] – the latitude of the marker and the center of the map. If you add lat and lng, do not add an address.
  • lng [int] – the longitude of the marker and the center of the map.
  • address[string] - the address of the marker and the center of the map. If you choose the address, do not add lat and lng.
  • zoom [int] – the zoom level (1-19).
  • type [int] – the starting map type. possible values are only ROADMAP, SATELLITE, HYBRID, or TERRAIN and must be in uppercase
  • directionsto [string] – the destination address for getting directions. obviously you want this to be the address of your latitude longitude coordinates.
  • content – what goes inside the infoWindow (speech bubble) that appears when the marker is clicked.

 三、显示效果

原创粉丝点击