2/location/base/get map image/en

Jump to: navigation, search

location/base/get_map_image

Generate a static map.

URL

https://api.weibo.com/2/location/base/get_map_image.json

Supported Formats

JSON

HTTP Request Method

GET

Requires Login

true
See the Login and Authorization Mechanism Statement for login and authorization details.

Requests Count Limitation

Level:Normal
Count Limitation:true
See the Interface Access Rights Statement for the request count limitation details.

Request Parameters

  Requires Type and Range Description
source false string This parameter is not needed when using OAuth.The value of this parameter is the AppKey.
access_token false string This parameter is required when using OAuth.You will get the access_token after oauth authorization.
center_coordinate false string Center coordinate.Longitude and latitude are separated by comma.'center_coordinate' or 'city' must be provided.'center_coordinate' is priority selection.
city false string City code.'center_coordinate' or 'city' must be provided.'center_coordinate' is priority selection.
coordinates false string Coordinates of punctuations.Longitude and latitude are separated by comma.Multiple coordinates are separated by “|”,and are limited by 10. Example:coordinates=120.0358,23.1014|116.0358,38.1014
names false string Names of punctuations.Multiple names are separated by comma,and are limited by 10.The quantity of the names must be equal with the quantity of the coordinates.
offset_x false string X axis deviation direction. East deviation is positive number.West deviation is negative number.Unit is 1/4 of the width of the picture.Example:offset_x=1; Map is 1/4 of the width of the picture right deviation.
offset_y false string Y axis deviation direction.North deviation is positive number. South deviation is negative number.Unit is 1/4 of the height of the picture.Example:offset_y=1; Map is 1/4 of the height of the picture up deviation.
font false string Font format.Parameter format:”font,font style,font size,font color,background color,whether have background(0:No; 1:Yes;)“,Example:font=song typeface,1,20,0XFF0C0C,0XFFFF00,1;Default is “song typeface,1,20,0XFF0CC0,0XFFFFE0,1”.The max value of font size is 72.The parameter 'font' is invalid if parameter 'coordinates' is not provided.
lines false string Draw a line in the map.Parameter format:“line color,line width,inflection point coordinates of the line ”;The longitude and latitude of the inflection point coordinates are separated by comma.The coordinates are separated by “|”,and are limited by 10.Example:lines=0XFF0000,2,116.32,39.96|116.12,39.96; value range:the width of the line 0-50
polygons false string Draw a polygon in the map.Parameter format:“border color,border width,fill color,fill opacity,inflection point coordinates of the polygon”;The longitude and latitude of the inflection point coordinates are separated by comma.The coordinates are separated by “|”,and are limited by 10.Example:polygons=0XFF0000,1,0XFF0000,50,116.32,39.96|116.12,39.96|116.32,39.86; value range:the width of the border 0-50;Default is 1.fill opacity 0(transparent)-100(opaque); Default is 50.
size false string The size of the map.Format is width×height. The max value is 800.Default is 240.Example:size=480×360
format false string Picture format of the map.Supports png, jpg and so on.The parameter is lower-case.Default is png.
zoom false string Focus level of the map.Value range is 1-17.Default is adaptive size.
scale false boolean Whether show the scale.true:Yes; false:No;
traffic false boolean Whether superpose practical traffic map.true:Yes; false:No;

Notes

None

Response

JSON Example

{
    "map_image_url": "http://sinaimg.cn/maptemp/20114/817/1302253899522_20.png"
}

See the Error Code Description for the error information details.

Field Description

None

Others

None



Language: [[{{{2/uri}}}|中文]]


文档更新时间: 29 January 2012