1. 查询地区经纬度, 返回JSON格式数据包
- {
-
"name": "shenzhen",
-
"Status": {
-
"code": 200,
-
"request": "geocode"
-
},
-
"Placemark": [ {
-
"id": "p1",
-
"address": "Shenzhen, Guangdong, China",
-
"AddressDetails": {
-
"Accuracy" : 4,
-
"Country" : {
-
"AdministrativeArea" : {
-
"AdministrativeAreaName" : "广东省",
-
"Locality" : {
-
"LocalityName" : "深圳市"
-
}
-
},
-
"CountryName" : "中国",
-
"CountryNameCode" : "CN"
-
}
-
},
-
"ExtendedData": {
-
"LatLonBox": {
-
"north": 22.7809313,
-
"south": 22.3293893,
-
"east": 114.3553162,
-
"west": 113.7524414
-
}
-
},
-
"Point": {
-
"coordinates": [ 114.0578680, 22.5430990, 0 ]
-
}
-
} ]
-
}
2. 显示行车路线(比如从深圳到南昌)
3. 显示一张静态图(比如从深圳到香港)
|label:
S|22.5430990,114.0578680&markers=color:green|label:H|22.2828305,114.1576130&sensor=false
当然我们也可以在后面加上output=参数,
output= Output format (blank (default) is a standard webpage for user)- output=html Uses the old style Google Local page format from before it merged with Google Maps, with the small map and large sidebar although this appears to display the standard format since June 2010. Use output=mobile for a similar effect.
- output=js Outputs JavaScript object literals and function calls used by Google Maps, including encoded polyline data for driving directions, and stage information in HTML format.
- output=kml Outputs a KML file containing information representing the current map. (works with Normal Searches, Directions and MyMaps)
- output=mobile Uses a similar style to the old style Google Local page format from before it merged with Google Maps. Displays a single red pushpin in the centre of map image. All movements are performed by links rather than mouse movements.
- output=nl Outputs a small KML file containing a NetworkLink wrapper linking to a URL from which Google Earth and Google Maps can obtain the information (only known to work with MyMaps).
- output=embed Outputs HTML suitable for embedding in third party sites, only works with the presence of the encrypted s= param, presumably to stop arbitrary content being included.
- output=dragdir returns a JSON object that contains the reverse geocode and a an encoded polyline for a given saddr (start point of the route) and daddr (endpoint of the route)
- output=georss (Geo)RSS output for the current map - probably only MyMaps
详见:
阅读(1380) | 评论(0) | 转发(0) |