Add prefecture ID to legend

这个提交包含在:
phl0 2023-12-04 11:42:12 +01:00
父节点 8995b44ea3
当前提交 2a6ac0374b
找不到此签名对应的密钥
GPG 密钥 ID: 48EA1E640798CA9A

查看文件

@ -150,7 +150,7 @@ info.onAdd = function (map) {
// method that we will use to update the control based on feature properties passed // method that we will use to update the control based on feature properties passed
info.update = function (props) { info.update = function (props) {
this._div.innerHTML = '<h4>Prefecture</h4>' + (props ? this._div.innerHTML = '<h4>Prefecture</h4>' + (props ?
'<b>' + props.name + '</b><br />' : 'Hover over a prefecture'); '<b>' + props.id.substring(3,5) + ' - ' + props.name + '</b><br />' : 'Hover over a prefecture');
}; };
info.addTo(map); info.addTo(map);