| callback | 获取限行数据的回调. success 代表是否获取限行数据成功,获取限行数据成功时,responseData 不为空;获取限行数据失败时,errorDesc 不为空. Callback for retrieving traffic restriction data. 'success' indicates whether the traffic restriction data was successfully obtained. When the data is successfully obtained, 'responseData' is not empty; when the data acquisition fails, 'errorDesc' is not empty.
- success 为true response成功时返回结构体: When success is true, the response returns a structure { "code": 1, -—code的value 为 1 请求限行数据成功 The value of code is 1, indicating a successful request for traffic restriction data "citynums": 1, "citys": [{ "citycode": 000, "rulenums": 1, "cityname": "XX市", "title": "XXX限行政策", "rules": [{ "ruleid": 1766888, "ring": 0, "effect": 1, "local": 2, "vehicle": 1, "time": "全天限行", "policyname": "二环及以内外地机动车限行", "summary": "二环路及以内道路(不含外侧辅路)", "desc": "2021年11月1日起,外地全部机动车限行", "otherdesc": "", "centerpoint": "116.397451,39.909060", "linepoints": "", "areapoints": ""。 }] }] } code: code的value 为 1 请求限行数据成功, code 为value 非1值,则代表限行数据服务返回失败 If the value of code is 1, the request for traffic restriction data is successful; if the value of code is not 1, it indicates that the traffic restriction data service has failed. areapoints: 1.在同一限行区域存在一个限行多边形时,限行数据为经度和纬度使用逗号(,)隔开,多个经纬度使用分号(;)隔开; When there is a restricted polygon in the same restricted area, the restricted data is separated by a comma (,) for longitude and latitude, and multiple longitude and latitude coordinates are separated by a semicolon (;) example一个多边形数据: |-------------— 多边形1-----------------—| 每一个多边形对应一个polygon example: a polygon data |-------------— Polygon1-----------------—| Each polygon corresponds to one polygon lon1,lat1;lon2,lat2;lon3,lat3;lon4,lat4; 2.在同一限行区域存在多个限行多边形时,多个多边形之间的数据使用竖线 (|) 隔开; When multiple restricted polygons exist in the same restricted area, the data between multiple polygons is separated by a vertical bar (|) example3个多边形数据: |-------------— 多边形1-----------------—| |--------— 多边形2--------—| |--------— 多边形3--------—| example: 3 polygon data: |-------------— Polygon1-----------------—| |--------— Polygon2--------—| |--------— Polygon3--------—| lon1,lat1;lon2,lat2;lon3,lat3;lon4,lat4| lon5,lat5;lon6,lat6;lon7,lat7| lon8,lat8;lon9,lat9;lon10,lat10 2.success 为false response为空,errorDesc为返回的错误描述 success is false, response is empty, errorDesc is the returned error description
|