1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-12 10:20:26 +00:00

Beginnings of real estate demo

This commit is contained in:
jeremy@jermolene.com 2023-02-13 22:44:39 +00:00
parent 800049e39d
commit f36e45ffa9
3 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,47 @@
title: $:/plugins/tiddlywiki/geospatial/demo/real-estate-demo
caption: Real Estate Demo
tags: $:/tags/GeospatialDemo
This is a list of all the tiddlers containing ~GeoJSON markers in this wiki (identified by the tag <<tag "$:/tags/GeoMarker">>) viewed as both a map and a table.
<$let
schema={{$:/plugins/tiddlywiki/geospatial/demo/real-estate-demo/schema}}
>
<table>
<thead>
<tr>
<$list filter="[<schema>jsonindexes[fields]]" variable="index">
<th>
<$text text={{{ [<schema>jsonget[fields],<index>,[caption]] }}}/>
</th>
</$list>
</tr>
</thead>
<tbody>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoMarker]sort[caption]]">
<tr>
<$list filter="[<schema>jsonindexes[fields]]" variable="index">
<td>
<$let
fieldname={{{ [<schema>jsonget[fields],<index>,[name]] }}}
>
<$text text={{{ [<currentTiddler>get<fieldname>] }}}/>
</$let>
</td>
</$list>
</tr>
</$list>
</tbody>
</table>
</$let>
<ul>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoMarker]sort[caption]]">
<li>
<$link>
<$view field="caption"><$view field="title"/></$view>
</$link>
</li>
</$list>
</ul>

View File

@ -0,0 +1,14 @@
{
"fields": [
{"name": "address", "caption": "Address", "type": "string"},
{"name": "broker", "caption": "Broker", "type": "string"},
{"name": "city", "caption": "City", "type": "string"},
{"name": "lat", "caption": "Latitude", "type": "number"},
{"name": "long", "caption": "Longitude", "type": "number"},
{"name": "price", "caption": "Price", "type": "number"},
{"name": "salesagent", "caption": "Sales Agent", "type": "string"},
{"name": "state", "caption": "State", "type": "string"},
{"name": "title", "caption": "Title", "type": "string"},
{"name": "zipcode", "caption": "Zip Code", "type": "string"}
]
}

View File

@ -0,0 +1,3 @@
title: $:/plugins/tiddlywiki/geospatial/demo/real-estate-demo/schema
type: application/json