我有以下字典(Geojson):
'properties': {
'fill': '#ffffff', 'fill-opacity': 1, 'stroke': '#ffffff',
'stroke-opacity': 1, 'stroke-width': 1.5, 'title': '0.00 m',
'time': '2000-01-31'
}
如何通过将某些值移动到属性内的新键中,使其变为以下方式,这是最简单的方法。
'properties': {
'style': {
'fill': '#ffffff', 'fill-opacity': 1, 'stroke': '#ffffff',
'stroke-opacity': 1, 'stroke-width': 1.5, 'title': '0.00 m'
},
'time': '2000-01-31'
}
}
任何反馈都将有所帮助。 谢谢。
properties
是关键。请明确一下。 - Vicrobot