This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properties Panel displays file properties (#12)
- Loading branch information
Showing
8 changed files
with
132 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import React from 'react'; | ||
import { FeatureCollection } from 'geojson'; | ||
|
||
import { Text } from './common'; | ||
|
||
interface PropertyProps { | ||
info: FeatureCollection | null; | ||
// children?: ReactNode; | ||
} | ||
|
||
const Properties: React.FC<PropertyProps> = (props: PropertyProps) => { | ||
console.log('props', props); | ||
const { info } = props; | ||
return ( | ||
<div> | ||
{info ? ( | ||
<> | ||
<p>Type: {info.type}</p> | ||
<ul> | ||
Properties:{' '} | ||
{info.features.map((feature) => { | ||
const { properties } = feature; | ||
console.log('properties', properties); | ||
return properties ? ( | ||
<> | ||
<br /> | ||
<li key={`${properties.fid}-map-properties`}> | ||
{properties.building} | ||
{properties.roomId} | ||
</li> | ||
<li> Floor: {properties.floor}</li> | ||
<li> | ||
{' '} | ||
Room: {properties.roomName} ({properties.roomType}) | ||
</li> | ||
<li> | ||
Search Tags: | ||
<ul> | ||
{properties.searchTagProps.map( | ||
(searchTag: string, i: number) => ( | ||
<li key={`${i}-search=tag`}>{searchTag}</li> | ||
) | ||
)} | ||
</ul> | ||
</li> | ||
<br /> | ||
</> | ||
) : ( | ||
'N/A' | ||
); | ||
})} | ||
</ul> | ||
</> | ||
) : ( | ||
'Open a file qt' | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Properties; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
|
||
// interface TextProps { | ||
// children: ReactN | ||
// } | ||
|
||
const Text: React.FC = () => { | ||
return <p></p>; | ||
}; | ||
|
||
export default Text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import Text from './Text'; | ||
|
||
export { Text }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters