Merge pull request #23 from phl0/prefIdToLegend

Pref id to legend
这个提交包含在:
Andreas Kristiansen 2023-12-04 11:50:48 +01:00 提交者 GitHub
当前提交 3459302899
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23

查看文件

@ -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);