title: ui/geomarker \define default-traveltime-time() 5400 \define completion-actions() <$action-log/> <$action-setfield $tiddler="$:/temp/_StatusCode" text=<>/> <$action-setfield $tiddler="$:/temp/_StatusText" text=<>/> <$action-setfield $tiddler="$:/temp/_Error" text=<>/> <$action-setfield $tiddler="$:/temp/_Result" text=<>/> <$action-setfield $tiddler="$:/temp/_Headers" text=<>/> <$list filter="[compare:number:gteq[200]compare:number:lteq[299]]" variable="ignore"> <$action-createtiddler $basetitle="$:/temp/_IsochroneLayer" text={{{ [] }}} tags="$:/tags/GeoLayer" caption={{{ [get[caption]elseaddprefix[Travel time from ]] }}}/> \end \define progress-actions() <$action-log message="In progress-actions"/> <$action-log/> \end \define payload-source() \rules only transcludeinline transcludeblock filteredtranscludeinline filteredtranscludeblock { "departure_searches": [ { "id": "My first isochrone", "coords": { "lat": {{!!lat}}, "lng": {{!!long}} }, "departure_time": "2023-02-27T08:00:00Z", "travel_time": {{{ [[$:/config/plugins/geospatial/traveltime/time]get[text]else] }}}, "transportation": { "type": "driving" } } ] } \end \define get-traveltime-actions() <$wikify name="payload" text=<>> <$action-log $message="Making payload"/> <$action-log/> <$action-sendmessage $message="tm-http-request" url="https://api.traveltimeapp.com/v4/time-map" method="POST" header-accept="application/geo+json" header-Content-Type="application/json" password-header-X-Api-Key="traveltime-secret-key" password-header-X-Application-Id="traveltime-application-id" body=<> var-currentTiddler=<> bind-status="$:/temp/plugins/tiddlywiki/geospatial/demo/traveltime/status" bind-progress="$:/temp/plugins/tiddlywiki/geospatial/demo/traveltime/progress" oncompletion=<> onprogress=<> /> \end !! Mapped <$geomap markers="[]" state=<> /> !! Distance to other markers <$let thisLocation={{{ [geopoint{!!long},{!!lat}] }}} >
    <$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoMarker]sort[caption]] -[]">
  • <$link><$view field="caption"><$view field="title"/> -- <$let otherLocation={{{ [geopoint{!!long},{!!lat}] }}} > <$text text={{{ [geodistance,,[miles]fixed[0]] }}}/> miles
!! GeoLayer Lookups <$let thisLocation={{{ [geopoint{!!long},{!!lat}] }}} >
    <$list filter="[all[shadows+tiddlers]tag[$:/tags/GeoLayer]sort[caption]]">
  • <$text text={{{ [get[caption]] :else[] }}}/> -- <$text text={{{ [geolookup{!!text}] }}}/>
!! Travel Time <$button actions=<>> Call ~TravelTime Maximum time: <$edit-text tiddler="$:/config/plugins/geospatial/traveltime/time" default=<> tag="input"/> seconds |Status |<$text text={{$:/temp/plugins/tiddlywiki/geospatial/demo/traveltime/status}}/> | |Progress |<$text text={{$:/temp/plugins/tiddlywiki/geospatial/demo/traveltime/progress}}/> | |Status Code |<$text text={{$:/temp/_StatusCode}}/> | |Status Text |<$text text={{$:/temp/_StatusText}}/> | |Error |<$text text={{$:/temp/_Error}}/> | <$list filter="[has[photo-url]]" variable="ignore"> !! Photo