本帖最后由 笔筒子 于 2009-11-28 10:48 编辑
回复 3# xt_yxl
我现在新申请了API,输入www.xsllw.com,出来三段代码,这样对吗?我应该选哪段中的呢?另外,发现没有GBK的样
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=ABQIAAAA9fqnCMsMjXTHh_hxWocQNBSoZ3BexdREg_6qcLYqYd5ffgPCkRReLlAQcX8hQRnx88onvX_sMyDmCw" 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 declaration, declare it directly within code as a Map.key property, or as a flashVars property within the HTML container. A sample MXML declaration is shown below.- ...
- <maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%"
- key="ABQIAAAA9fqnCMsMjXTHh_hxWocQNBSoZ3BexdREg_6qcLYqYd5ffgPCkRReLlAQcX8hQRnx88onvX_sMyDmCw"/>
- ...
复制代码 HTTP Service Example
Within a Maps API HTTP Service, such as the Static Maps API or Geocoding Service, place the key directly in the request URL:- http://maps.google.com/maps/geo?q=1600+Amphitheatre+Parkway,+Mountain+View,+CA&output=json&oe=utf8\
- &sensor=true_or_false&key=ABQIAAAA9fqnCMsMjXTHh_hxWocQNBSoZ3BexdREg_6qcLYqYd5ffgPCkRReLlAQcX8hQRnx88onvX_sMyDmCw
复制代码 Note that for all examples, you must replace the sensor parameter with a valid value, based on whether your application uses a sensor to determine a user's location. Check out the API documentation for more information. |