2023-03-16 17:22:22 +00:00
|
|
|
title: ui/geolayer
|
2023-01-06 10:38:27 +00:00
|
|
|
|
|
|
|
\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>]"
|
2023-03-10 12:45:20 +00:00
|
|
|
state=<<qualify "$:/state/demo-map">>
|
2023-01-06 10:38:27 +00:00
|
|
|
/>
|
|
|
|
|
|
|
|
!! Intersect with other layers
|
|
|
|
|
|
|
|
<$let
|
2023-01-06 10:49:45 +00:00
|
|
|
captionThisLayer={{{ [<currentTiddler>get[caption]else<currentTiddler>] }}}
|
2023-01-06 10:38:27 +00:00
|
|
|
>
|
|
|
|
<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>
|