mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-04 07:22:47 +00:00
User interface improvements for geomarkers and geolayers
This commit is contained in:
parent
e17906bbd8
commit
a8ca8bffdb
@ -0,0 +1,6 @@
|
|||||||
|
title: $:/plugins/geospatial/demo/ViewTemplateBodyFilters
|
||||||
|
tags: $:/tags/ViewTemplateBodyFilter
|
||||||
|
list-before: $:/config/ViewTemplateBodyFilters/stylesheet
|
||||||
|
|
||||||
|
[tag[$:/tags/GeoLayer]then[$:/plugins/tiddlywiki/geospatial/demo/ui/geolayer]]
|
||||||
|
[tag[$:/tags/GeoMarker]then[$:/plugins/tiddlywiki/geospatial/demo/ui/geomarker]]
|
37
plugins/tiddlywiki/geospatial/demo/ui/geolayer.tid
Normal file
37
plugins/tiddlywiki/geospatial/demo/ui/geolayer.tid
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
title: $:/plugins/tiddlywiki/geospatial/demo/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>]"
|
||||||
|
/>
|
||||||
|
|
||||||
|
!! Intersect with other layers
|
||||||
|
|
||||||
|
<$let
|
||||||
|
captionThisLayer={{!!caption}}
|
||||||
|
>
|
||||||
|
<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>
|
@ -1,6 +1,4 @@
|
|||||||
title: $:/plugins/tiddlywiki/geospatial/demo/traveltime
|
title: $:/plugins/tiddlywiki/geospatial/demo/ui/geomarker
|
||||||
caption: Traveltime
|
|
||||||
tags: $:/tags/GeospatialDemo
|
|
||||||
|
|
||||||
\define completion-actions()
|
\define completion-actions()
|
||||||
<$action-log/>
|
<$action-log/>
|
||||||
@ -26,11 +24,11 @@ tags: $:/tags/GeospatialDemo
|
|||||||
{
|
{
|
||||||
"id": "My first isochrone",
|
"id": "My first isochrone",
|
||||||
"coords": {
|
"coords": {
|
||||||
"lat": 51.507609,
|
"lat": {{!!lat}},
|
||||||
"lng": -0.128315
|
"lng": {{!!long}}
|
||||||
},
|
},
|
||||||
"departure_time": "2021-09-27T08:00:00Z",
|
"departure_time": "2021-09-27T08:00:00Z",
|
||||||
"travel_time": 3600,
|
"travel_time": 5400,
|
||||||
"transportation": {
|
"transportation": {
|
||||||
"type": "driving"
|
"type": "driving"
|
||||||
}
|
}
|
||||||
@ -52,7 +50,7 @@ tags: $:/tags/GeospatialDemo
|
|||||||
password-header-X-Api-Key="traveltime-secret-key"
|
password-header-X-Api-Key="traveltime-secret-key"
|
||||||
password-header-X-Application-Id="traveltime-application-id"
|
password-header-X-Application-Id="traveltime-application-id"
|
||||||
body=<<payload>>
|
body=<<payload>>
|
||||||
var-context="Context string"
|
var-currentTiddler=<<currentTiddler>>
|
||||||
bind-status="$:/temp/plugins/tiddlywiki/geospatial/demo/traveltime/status"
|
bind-status="$:/temp/plugins/tiddlywiki/geospatial/demo/traveltime/status"
|
||||||
bind-progress="$:/temp/plugins/tiddlywiki/geospatial/demo/traveltime/progress"
|
bind-progress="$:/temp/plugins/tiddlywiki/geospatial/demo/traveltime/progress"
|
||||||
oncompletion=<<completion-actions>>
|
oncompletion=<<completion-actions>>
|
||||||
@ -61,32 +59,40 @@ tags: $:/tags/GeospatialDemo
|
|||||||
</$wikify>
|
</$wikify>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
|
!! Mapped
|
||||||
|
|
||||||
|
<$geomap
|
||||||
|
markers="[<currentTiddler>]"
|
||||||
|
/>
|
||||||
|
|
||||||
|
!! Distance to other markers
|
||||||
|
|
||||||
|
<$let
|
||||||
|
thisLocation={{{ [geopoint{!!lat},{!!long}] }}}
|
||||||
|
>
|
||||||
|
<ul>
|
||||||
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoMarker]sort[caption]] -[<currentTiddler>]">
|
||||||
|
<li>
|
||||||
|
<$link><$transclude field="caption"><$view field="title"/></$transclude></$link>
|
||||||
|
--
|
||||||
|
<$let
|
||||||
|
otherLocation={{{ [geopoint{!!lat},{!!long}] }}}
|
||||||
|
>
|
||||||
|
<$text text={{{ [geodistance<thisLocation>,<otherLocation>,[miles]fixed[0]] }}}/> miles
|
||||||
|
</$let>
|
||||||
|
</li>
|
||||||
|
</$list>
|
||||||
|
</ul>
|
||||||
|
</$let>
|
||||||
|
|
||||||
|
!! Travel Time
|
||||||
|
|
||||||
<$button actions=<<get-traveltime-actions>>>
|
<$button actions=<<get-traveltime-actions>>>
|
||||||
Call ~TravelTime
|
Call ~TravelTime
|
||||||
</$button>
|
</$button>
|
||||||
|
|
||||||
Status:
|
|Status |<$text text={{$:/temp/plugins/tiddlywiki/geospatial/demo/traveltime/status}}/> |
|
||||||
<pre><code><$text text={{$:/temp/plugins/tiddlywiki/geospatial/demo/traveltime/status}}/></code></pre>
|
|Progress |<$text text={{$:/temp/plugins/tiddlywiki/geospatial/demo/traveltime/progress}}/> |
|
||||||
|
|Status Code |<$text text={{$:/temp/_StatusCode}}/> |
|
||||||
Progress:
|
|Status Text |<$text text={{$:/temp/_StatusText}}/> |
|
||||||
<pre><code><$text text={{$:/temp/plugins/tiddlywiki/geospatial/demo/traveltime/progress}}/></code></pre>
|
|Error |<$text text={{$:/temp/_Error}}/> |
|
||||||
|
|
||||||
Response
|
|
||||||
|
|
||||||
~StatusCode:
|
|
||||||
<pre><code><$text text={{$:/temp/_StatusCode}}/></code></pre>
|
|
||||||
|
|
||||||
~StatusText:
|
|
||||||
<pre><code><$text text={{$:/temp/_StatusText}}/></code></pre>
|
|
||||||
|
|
||||||
Error:
|
|
||||||
<pre><code><$text text={{$:/temp/_Error}}/></code></pre>
|
|
||||||
|
|
||||||
Headers:
|
|
||||||
<pre><code><$text text={{$:/temp/_Headers}}/></code></pre>
|
|
||||||
|
|
||||||
Result:
|
|
||||||
<pre><code><$text text={{$:/temp/_Result}}/></code></pre>
|
|
||||||
|
|
@ -2,4 +2,4 @@ title: $:/plugins/tiddlywiki/geospatial/readme
|
|||||||
|
|
||||||
! Demos
|
! Demos
|
||||||
|
|
||||||
<<tabs tabsList:"[all[tiddlers+shadows]tag[$:/tags/GeospatialDemo]]" default:"$:/plugins/tiddlywiki/geospatial/demo/traveltime">>
|
<<tabs tabsList:"[all[tiddlers+shadows]tag[$:/tags/GeospatialDemo]]" default:"$:/plugins/tiddlywiki/geospatial/demo/data">>
|
||||||
|
Loading…
Reference in New Issue
Block a user