1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-02-15 02:20:02 +00:00

52 lines
1.2 KiB
Plaintext
Raw Normal View History

title: GeoMarkers
2023-01-30 08:57:30 +00:00
tags: $:/tags/GeospatialDemo
\procedure onsuccess()
<$action-setfield
$tiddler="CurrentLocation"
tags="$:/tags/GeoMarker"
timestamp=<<timestamp>>
lat=<<latitude>>
long=<<longitude>>
alt=<<altitude>>
accuracy=<<accuracy>>
2023-09-09 15:23:46 +01:00
altitudeAccuracy=<<altitudeAccuracy>>
heading=<<heading>>
speed=<<speed>>
/>
\end
\procedure onerror()
<$action-setfield
$tiddler="CurrentLocation"
$field="text"
$value=<<error>>
/>
\end
\procedure onclick()
<$action-sendmessage
$message="tm-request-geolocation"
actionsSuccess=<<onsuccess>>
actionsError=<<onerror>>
/>
\end
2023-04-03 17:59:01 +01:00
This is a list of all the tiddlers containing ~GeoJSON markers in this wiki (identified by the tag <<tag "$:/tags/GeoMarker">>). A ~GeoJSON marker identifies a location via latitude and longitude (and optional altitude) and may also contain associated metadata in JSON format.
2023-01-30 08:57:30 +00:00
Click this button to create a marker from the current location: <$button actions=<<onclick>>>
Request location
</$button>
{{CurrentLocation}}
2023-01-30 08:57:30 +00:00
<ul>
<$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoMarker]sort[caption]]">
<li>
<$link>
<$view field="caption"><$view field="title"/></$view>
</$link>
</li>
</$list>
</ul>