2023-03-16 17:22:22 +00:00
title: GeoMarkers
2023-01-30 08:57:30 +00:00
tags: $:/tags/GeospatialDemo
2023-09-09 10:36:44 +00:00
\procedure onsuccess()
<$action-setfield
$tiddler="CurrentLocation"
tags="$:/tags/GeoMarker"
timestamp=<<timestamp>>
lat=<<latitude>>
long=<<longitude>>
alt=<<altitude>>
accuracy=<<accuracy>>
altitudeAccurary=<<altitudeAccurary>>
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 16:59:01 +00: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
2023-09-09 10:36:44 +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>