mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-27 09:15:29 +01:00
Add feature id to FeaturePropertyPopup
This commit is contained in:
parent
0c592bacab
commit
0433d66f45
1 changed files with 8 additions and 1 deletions
|
@ -21,12 +21,19 @@ function renderProperties(feature) {
|
|||
})
|
||||
}
|
||||
|
||||
function renderFeatureId(feature) {
|
||||
return <InputBlock key={"feature-id"} label={"feature id"}>
|
||||
<StringInput value={displayValue(feature.id)} style={{backgroundColor: 'transparent'}} />
|
||||
</InputBlock>
|
||||
}
|
||||
|
||||
function renderFeature(feature, idx) {
|
||||
return <div key={`${feature.sourceLayer}-${idx}`}>
|
||||
<div className="maputnik-popup-layer-id">{feature.layer['source-layer']}{feature.inspectModeCounter && <span> × {feature.inspectModeCounter}</span>}</div>
|
||||
<InputBlock key={"property-type"} label={"$type"}>
|
||||
<StringInput value={feature.geometry.type} style={{backgroundColor: 'transparent'}} />
|
||||
</InputBlock>
|
||||
{renderFeatureId(feature)}
|
||||
{renderProperties(feature)}
|
||||
</div>
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue