Query for Place entity
URI format:
http://authority.ddbc.edu.tw/webwidget/getAuthorityData.php?type=place&id=<AuthorityID>&jsoncallback=<string>
Specification:
| Argument |
Value(s) |
Description |
| type |
"place" |
Specifies the query type |
| id |
<AuthorityID> |
The DDBC Authority ID of the entity |
| jsoncallback |
<string> |
Required by third-party JavaScript libraries (e.g. EXT Js) to perform ajax functions. The value of jsoncallback has no effect on query processing, but will be attached to the beginning of the returned json string. |
Example:
http://authority.ddbc.edu.tw/webwidget/getAuthorityData.php?type=place&id=CN0410300Z01AA&jsoncallback=abc123
Json return:
abc123({
"data1": {
"authorityID":"CN0410300Z01AA",
"name": "雒陽",
"dynasty": "東漢",
"lat": "112.6329",
"long": "34.7109",
"districtHistorical": "東漢_司隸校尉部",
"districtModern": " 河南省-洛陽市",
"note":"本名成周,戰國時改名洛陽。以在洛水之北而得名。東漢建武元年,建都于此。(歷地史:1986)",
"names":"[中文]: 雒邑;洛陽"
}
})
Fields in Json string:
| Field Name |
Description |
| name |
Authoritative name of the Place entity |
| dynasty |
Dynasty relating to the Place entity |
| authorityID |
Authority ID of the Place entity |
| long |
Geographic longitude |
| lat |
Geographic latitude |
| districtHistorical |
Historical administrative district in which the Place entity is (was) located |
| districtModern |
Modern administrative district in which the Place entity is (was) located |
| names |
Other names (and/or titles) associated with the Place entity |
| note |
A description of this Place |
JavaScript example for processing json string:
function print_ddbcAuth_place(jsoncallback) { // 'jsoncallback' is the string returned by the data-service
var html='';
html+='<table>';
if(jsoncallback.data1.Name) {
html+='<tr>';
html+='<td><em>Place name:</em></td><td>'+jsoncallback.data1.Name+'</td>';
html+='</tr>';
}
if(jsoncallback.data1.X) {
html+='<tr>';
html+='<td><em>Coordinates:</em></td>';
html+='<td>'+jsoncallback.data1.Y+','+jsoncallback.data1.X+'</td>';
html+='</tr>';
}
html+='</table>';
echo html;
};