mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-07 02:26:19 +00:00
39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
title: ui/geolayer
|
|
|
|
\define create-intersection()
|
|
<$let
|
|
intersectLayer={{{ =[<currentTiddler>get[text]] =[<otherLayer>get[text]] +[geointersect[]] }}}
|
|
>
|
|
<$action-createtiddler $basetitle="$:/temp/_IsochroneLayer" text={{{ [<intersectLayer>] }}} tags="$:/tags/GeoLayer" caption={{{ [<captionThisLayer>addsuffix[ intersected with ]addsuffix<captionOtherLayer>] }}}/>
|
|
</$let>
|
|
\end
|
|
|
|
!! Mapped
|
|
|
|
|
|
<$geomap
|
|
layers="[<currentTiddler>]"
|
|
state=<<qualify "$:/state/demo-map">>
|
|
/>
|
|
|
|
!! Intersect with other layers
|
|
|
|
<$let
|
|
captionThisLayer={{{ [<currentTiddler>get[caption]else<currentTiddler>] }}}
|
|
>
|
|
<ul>
|
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoLayer]sort[caption]] -[<currentTiddler>]" variable="otherLayer">
|
|
<$let
|
|
captionOtherLayer={{{ [<otherLayer>get[caption]else<otherLayer>] }}}
|
|
>
|
|
<li>
|
|
<$link to=<<otherLayer>>><$transclude tiddler=<<otherLayer>> field="caption"><$view tiddler=<<otherLayer>> field="title"/></$transclude></$link>
|
|
<$button actions=<<create-intersection>>>
|
|
Create intersection
|
|
</$button>
|
|
</li>
|
|
</$let>
|
|
</$list>
|
|
</ul>
|
|
</$let>
|