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

本文介绍如何配置及使用Google Maps V3插件。首先需要在设置中输入API key,然后可通过Widgets拖拽小工具进行部署。文中还提供了在Post或Pages中使用的代码示例。

一、配置

插件安装成功之后,可在"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.

三、显示效果

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值