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

一、配置

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

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

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

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

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

二、如何使用?

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

wordpress中Google Map V3 for 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.

三、显示效果

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