1、注册gooogle map api key。
输入网址http://www.google.com/apis/maps/
到google map api主页
在页面的右面点击注册一个Gooogle地图API密钥
在新的页面中进行如下设置并点击生成API密钥。其中我的网址可以是域名、IP,建议调试的时候为http://localhost申请一个Key,便于测试和修改。
点击生成API密钥后进入到如下页面,注意记录下自己申请的Key和示例代码。
下面即为我们注册的Key 查看地址:http://code.google.com/intl/zh-CN/apis/maps/signup.html
Thank You for Signing Up for a Google Maps API Key!
Your key is:
ABQIAAAArE134c2Mr3M29FkARzPFlRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxR48vLPcCXKDxOOw0-JDlZzbOdQxA
Note: for more information on the API key system, consult http://code.google.com/apis/maps/faq.html#keysystem.
How you use your key depends on what Maps API product or service you use. Your key is valid for use within the entire family of Google Maps API solutions. The following examples show how to use your key within the Maps API product family.
JavaScript Maps API Example
Within the JavaScript Maps API, place the key within the script tag when you load the API:
...
// Note: you will need to replace the sensor parameter below with either an explicit true or false value.
<script src="http://maps.google.com/maps?file=api&v=2&sensor=true_or_false&key=ABQIAAAArE134c2Mr3M29FkARzPFlRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxR48vLPcCXKDxOOw0-JDlZzbOdQxA" type="text/javascript"></script>
...
See Loading the Maps API in the JavaScript Maps API documentation for more information.
Maps API for Flash Example
Within the Maps API for Flash, you may place the key within an MXML declarati