garage44.eu/jeroen/cartopolis

logclone: git clone https://garage44.eu/jeroen/cartopolis.git

.. /docs/mockups/routing/v1.html

raw

<!doctype html>
<html><head><meta charset="utf-8"><title>Routing — v1</title><link rel="stylesheet" href="style.css">
<svg width="0" height="0" style="position:absolute">
  <defs>
    <symbol id="car" viewBox="0 0 24 24"><path d="M5 16h14M6 16l1.5-5h9L18 16M5 16v3M19 16v3"/><circle cx="8" cy="16" r="0.6"/><circle cx="16" cy="16" r="0.6"/></symbol>
    <symbol id="bike" viewBox="0 0 24 24"><circle cx="6" cy="16" r="3.5"/><circle cx="18" cy="16" r="3.5"/><path d="M6 16l4-7h5l3 7M10 9l2 7h-6M14 6h2"/></symbol>
    <symbol id="walk" viewBox="0 0 24 24"><circle cx="13" cy="4.5" r="1.6"/><path d="M11 21l2-6-2-3 1-4 3 3h3M9 12l2-4M13 15l3 6"/></symbol>
    <symbol id="play" viewBox="0 0 24 24"><path d="M8 5l11 7-11 7z"/></symbol>
    <symbol id="skip" viewBox="0 0 24 24"><path d="M5 5l9 7-9 7zM17 5v14"/></symbol>
    <symbol id="left" viewBox="0 0 24 24"><path d="M15 20v-7a4 4 0 0 0-4-4H5M9 5L5 9l4 4"/></symbol>
    <symbol id="gps" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"/><path d="M12 2v3M12 19v3M2 12h3M19 12h3"/></symbol>
    <symbol id="pin" viewBox="0 0 24 24"><path d="M12 21s-6-6.1-6-11a6 6 0 0 1 12 0c0 4.9-6 11-6 11z"/><circle cx="12" cy="10" r="2.2"/></symbol>
    <symbol id="route" viewBox="0 0 24 24"><circle cx="6" cy="18" r="2"/><circle cx="18" cy="6" r="2"/><path d="M8 18h7a3 3 0 0 0 0-6H9a3 3 0 0 1 0-6h7"/></symbol>
    <symbol id="meet" viewBox="0 0 24 24"><circle cx="5" cy="18" r="2"/><circle cx="19" cy="18" r="2"/><path d="M6.5 16.5L12 9l5.5 7.5"/><path d="M12 9V4l3 1.5L12 7"/></symbol>
    <symbol id="globe" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3c3 3.2 3 14.8 0 18M12 3c-3 3.2-3 14.8 0 18"/></symbol>
    <symbol id="here" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><circle cx="12" cy="12" r="7"/><path d="M12 2v3M12 19v3M2 12h3M19 12h3"/></symbol>
    <symbol id="cal" viewBox="0 0 24 24"><rect x="4" y="5" width="16" height="15" rx="2"/><path d="M4 10h16M9 3v4M15 3v4"/></symbol>
    <symbol id="nav" viewBox="0 0 24 24"><path d="M3 11l18-8-8 18-2-8z"/></symbol>
    <symbol id="check" viewBox="0 0 24 24"><path d="M5 12l5 5 9-10"/></symbol>
    <symbol id="logopin" viewBox="158 44 64 72"><path d="M190 47 C 175.05 47 162.7 58.05 162.7 73 C 162.7 91.85 190 112 190 112 C 190 112 217.3 91.85 217.3 73 C 217.3 58.05 204.95 47 190 47 Z" fill="#FD6012" stroke="#F2EFEA" stroke-width="5"/><circle cx="190" cy="73" r="8.45" fill="#F2EFEA"/></symbol>
  </defs>
</svg>
</head>
<body>

<h1>Routing — <b>v1: walk in the world, ride and drive with a GPS, meet through a chat</b></h1>
<p class="lede">Every frame is a <b>real capture of today's phone build</b> (412×915, the shot harness, Groningen) with the proposal drawn over it.
Three journeys: <i>Walk</i> happens in the world — the avatar, the map and the follow camera stay. <i>Bike</i> and <i>Car</i> are
real-world navigation and use today's driver mode, which needs a position fix. And a friend's chat is where a route starts
when the point of it is to meet somebody.</p>
<div class="legend"><span><span class="swatch"></span>new — not in the app today</span><span><span class="today"></span>everything else is today's app, unchanged</span></div>

<!-- ============================================================ -->
<section>
<h2><span>1</span>The planner: one sheet, three answers</h2>
<p>Today's bottom sheet, same place and same two detents. The mode chips carry each mode's time, solved together from the corridor the planner already fetches,
so choosing a mode is a look rather than three solves. The Start button names what it will do.</p>
<div class="row">

  <div class="shot">
    <div class="screen" style="background-image:url(shots/planner.png)"></div>
    <h3><span>A</span>Today <em>capture</em></h3>
    <ul><li>Mode chips Car / Bike / Walk; one time shown, for the selected mode.</li>
        <li>Start always enters the same car satnav — for a walk too.</li></ul>
  </div>

  <div class="shot">
    <div class="screen" style="background-image:url(shots/planner.png)">
      <div class="glass sheet new solid" id="sheetB" style="bottom:65px">
        <div class="grab"></div>
        <div class="chips">
          <div class="chip"><span class="t"><svg class="i"><use href="#car"/></svg>9 min</span><span class="m">Car</span></div>
          <div class="chip on"><span class="t"><svg class="i"><use href="#bike"/></svg>12 min</span><span class="m">Bike</span></div>
          <div class="chip"><span class="t"><svg class="i"><use href="#walk"/></svg>31 min</span><span class="m">Walk</span></div>
          <div class="x">✕</div>
        </div>
        <div class="summary"><b>12 min</b><span class="dim">· 2.6 km</span></div>
        <div class="via">mostly fietspad · via Noorderhaven</div>
        <div class="actions"><span class="btn">Clear</span><span class="btn primary grow"><svg class="i"><use href="#bike"/></svg>Ride</span></div>
      </div>
    </div>
    <h3><span>B</span>Bike chosen <em class="new">new</em></h3>
    <ul><li><b>All three times at once</b> on the chips. The line on the map is the selected mode's.</li>
        <li>Bike is its own mode because the Netherlands is full of bike-only roads; the sheet says how much of the route is fietspad.</li>
        <li>Start reads <b>Ride</b>. With a fix it opens driver mode with cycling chrome (frame F).</li></ul>
  </div>

  <div class="shot">
    <div class="screen" style="background-image:url(shots/planner.png)">
      <div class="glass sheet new solid" style="bottom:65px">
        <div class="grab"></div>
        <div class="chips">
          <div class="chip on"><span class="t"><svg class="i"><use href="#car"/></svg>9 min</span><span class="m">Car</span></div>
          <div class="chip"><span class="t"><svg class="i"><use href="#bike"/></svg>12 min</span><span class="m">Bike</span></div>
          <div class="chip"><span class="t"><svg class="i"><use href="#walk"/></svg>31 min</span><span class="m">Walk</span></div>
          <div class="x">✕</div>
        </div>
        <div class="summary"><b>9 min</b><span class="dim">· 3.4 km</span></div>
        <div class="via"><span style="color:var(--warn)">●</span> Driving needs this device's position. Plan and read the turns here, drive with the phone.</div>
        <div class="actions"><span class="btn">Clear</span><span class="btn off grow"><svg class="i"><use href="#gps"/></svg>Needs a GPS position</span></div>
      </div>
    </div>
    <h3><span>C</span>Car, no position fix <em class="new">new</em></h3>
    <ul><li>Car is <b>real navigation only</b>: no fix, no Start. The route, the time and the turn list all still work.</li>
        <li>Desktop gets a fix when it has a location source (GeoClue on Linux, the OS service on Windows and macOS) — later step.</li>
        <li>No drivable car in the world, and no protocol change.</li></ul>
  </div>

  <div class="shot">
    <div class="screen" style="background-image:url(shots/planner.png)">
      <div class="glass sheet new solid" style="bottom:65px">
        <div class="grab"></div>
        <div class="chips">
          <div class="chip"><span class="t"><svg class="i"><use href="#car"/></svg>9 min</span><span class="m">Car</span></div>
          <div class="chip"><span class="t"><svg class="i"><use href="#bike"/></svg>12 min</span><span class="m">Bike</span></div>
          <div class="chip on"><span class="t"><svg class="i"><use href="#walk"/></svg>31 min</span><span class="m">Walk</span></div>
          <div class="x">✕</div>
        </div>
        <div class="summary"><b>31 min</b><span class="dim">· 2.4 km · to the front door</span></div>
        <div class="via">That's a long walk in the world — skip ahead any time.</div>
        <div class="actions"><span class="btn">Clear</span><span class="btn">Walk</span><span class="btn primary grow"><svg class="i"><use href="#play"/></svg>Walk me there</span></div>
      </div>
    </div>
    <h3><span>D</span>Walk chosen <em class="new">new</em></h3>
    <ul><li><b>Walk</b>: you walk it yourself, the route drawn on the ground.</li>
        <li><b>Walk me there</b>: the avatar follows the route by itself (the bot account's <code>walk_to</code> already does this). Any movement key takes over.</li>
        <li>The route ends at the building's <b>entrance</b> from the BAG address register, not at the nearest road.</li></ul>
  </div>

</div>
</section>

<!-- ============================================================ -->
<section>
<h2><span>2</span>Following the route: walking stays in the world, riding and driving use driver mode</h2>
<p>Today, Start strips the map, hides the avatar and locks a chase camera — for every mode. Walking keeps all of that instead; the satnav is for when you are really moving.</p>
<div class="row">

  <div class="shot">
    <div class="screen" style="background-image:url(shots/walk.png)">
      <svg class="new" style="left:0;top:0;width:412px;height:915px;outline:none" viewBox="0 0 412 915">
        <path d="M214 762 C 290 764, 336 706, 344 610 S 356 360, 372 240" fill="none" stroke="#0A0E10" stroke-width="15" stroke-linecap="round" stroke-linejoin="round"/><path id="walkline" d="M214 762 C 290 764, 336 706, 344 610 S 356 360, 372 240" fill="none" stroke="#3E8EDE" stroke-width="9" stroke-linecap="round" stroke-linejoin="round"/>
      </svg>
      <div class="tag" style="left:350px;top:520px">NEW</div>
      <div class="glass turn new" style="top:16px;left:60px"><div class="arrow" style="background:var(--brand)"><svg class="i" style="transform:scaleX(-1)"><use href="#left"/></svg></div>
        <div><b>40 m</b><span>Right into Oude Ebbingestraat</span></div></div>
      <div class="glass new" style="left:10px;right:10px;bottom:72px;padding:8px 10px;display:flex;align-items:center;gap:8px">
        <div style="flex:1"><div style="color:var(--cream);font-size:15px">27 min <span class="dim small">· 2.1 km left</span></div><div class="dim small">Stadsschouwburg, front door</div></div>
        <span class="btn v4"><svg class="i"><use href="#skip"/></svg>Skip</span><span class="btn v4"><svg class="i"><use href="#play"/></svg>Auto</span><span class="btn v4">Stop</span>
      </div>
    </div>
    <h3><span>E</span>Walking <em class="new">new</em></h3>
    <ul><li>Avatar, buildings, people, chat and the follow camera all stay. Only the route and two small boxes are added.</li>
        <li>The route is today's blue line with a dark edge, as in v4; the next turn is a small card, orange because it is the world's chrome, not the satnav's blue.</li>
        <li><b>Skip</b> jumps to the next junction (long-press: to the destination). <b>Auto</b> is Walk me there.</li></ul>
  </div>

  <div class="shot">
    <div class="screen" style="background-image:url(shots/driver.png)">
      <div class="tag" style="right:14px;top:14px">BIKE VARIANT</div>
    </div>
    <h3><span>F</span>Riding or driving <em>capture</em></h3>
    <ul><li>Today's driver mode, unchanged for the car: chase camera, turn card, route rail, speed pill.</li>
        <li>For a bike <span style="color:var(--brand)">(new)</span>: bike speeds on the rail, no speed-limit sign, the turn card names the fietspad, and the camera rig is tuned for 15–25 km/h.</li>
        <li>Both need a position fix; the avatar is moved to the fix, as today.</li></ul>
  </div>

  <div class="shot">
    <div class="screen" style="background-image:url(shots/walk.png)">
      <div class="glass pill new" style="left:50%;transform:translateX(-50%);top:58px;white-space:nowrap"><span class="dot" style="background:var(--brand)"></span>Walking you there · any key takes over</div>
      <svg style="left:0;top:0;width:412px;height:915px" viewBox="0 0 412 915">
        <path d="M214 762 C 290 764, 336 706, 344 610 S 356 360, 372 240" fill="none" stroke="#0A0E10" stroke-width="15" stroke-linecap="round" stroke-linejoin="round"/><path d="M214 762 C 290 764, 336 706, 344 610 S 356 360, 372 240" fill="none" stroke="#3E8EDE" stroke-width="9" stroke-linecap="round" stroke-linejoin="round"/>
      </svg>
      <div class="glass new" style="left:10px;right:10px;bottom:72px;padding:10px 12px">
        <div style="display:flex;justify-content:space-between;color:var(--cream)"><span>Skip ahead to…</span><span class="dim small">✕</span></div>
        <div style="display:flex;flex-direction:column;gap:6px;margin-top:8px;font-size:13.5px">
          <div class="btn v4" style="justify-content:space-between"><span>Next turn · Oude Ebbingestraat</span><span class="dim">40 m</span></div>
          <div class="btn v4" style="justify-content:space-between"><span>Halfway · Noorderplantsoen</span><span class="dim">1.1 km</span></div>
          <div class="btn v4 po" style="justify-content:space-between"><span>Arrive · Stadsschouwburg</span><span>2.1 km</span></div>
        </div>
      </div>
    </div>
    <h3><span>G</span>Walk me there, and skipping <em class="new">new</em></h3>
    <ul><li>While the avatar walks itself, a pill at the top says so — any movement key or a drag hands control back.</li>
        <li>Long-pressing Skip offers the stops along the route. A skip is today's teleport, along the route.</li>
        <li>Online, other people see you walk — or appear, after a skip.</li></ul>
  </div>

</div>
</section>

<!-- ============================================================ -->
<section>
<h2><span>3</span>Meeting a friend: v4's meet-up, with a route for each person</h2>
<p>The meet-up is the one already designed in <a style="color:var(--brand)" href="../chat-world/README.md">chat-world v4</a> (screen 6): a place, a time and who's coming, where saying <i>I'm going</i> asks once to share your real location with the others going, from 15 minutes before until you arrive.
This adds three things: <i>Route</i> on everything in a chat, a suggested place that is fair to both of you, and each person's route on the chat's map. All of it travels inside the chat's end-to-end encrypted messages.</p>
<div class="row">

  <div class="shot">
    <div class="screen" style="background-image:url(shots/chatthread.png)">
      <!-- the point's single "Open in world" becomes a row of two -->
      <div style="left:20px;top:466px;width:244px;height:40px;background:var(--raised)"></div>
      <div class="brow" style="left:24px;top:471px;width:236px"><span class="po"><svg class="i"><use href="#globe"/></svg>Open in world</span><span class="new"><svg class="i"><use href="#route"/></svg>Route</span></div>
      <!-- today's "shares their location" row, with Route beside Show -->
      <div style="left:0;top:572px;width:412px;height:274px;background:rgb(20,19,18)"></div>
      <div class="locrow" style="left:12px;top:806px"><span style="color:var(--real)"><svg class="i"><use href="#here"/></svg>Sanne shares their location</span><span class="btn">Show</span><span class="btn new"><svg class="i"><use href="#route"/></svg>Route</span></div>
    </div>
    <h3><span>H</span>Route from a chat <em class="new">new: Route</em></h3>
    <ul><li>A point's card gets <b>Route</b> beside today's Open in world, in v4's button row.</li>
        <li>Today's "Sanne shares their location · Show" line gets <b>Route</b> too. A route to a person follows them: it re-plans when they have moved ~50 m.</li></ul>
  </div>

  <div class="shot">
    <div class="screen" style="background-image:url(shots/chatthread.png)">
      <div style="left:0;top:276px;width:412px;height:570px;background:rgb(20,19,18)"></div>
      <div class="bubble" style="left:12px;top:300px;background:var(--raised);border:none"><div class="who">Sanne</div>Somewhere in between?</div>
      <div class="meetcard new" style="left:12px;top:372px;width:330px">
        <div class="img" style="background:url(shots/chatworld.png) -40px -300px">
          <div class="dest" style="left:165px;top:66px"><svg class="lpin"><use href="#logopin"/></svg></div>
        </div>
        <div class="body"><b><svg class="i" style="vertical-align:-3px"><use href="#cal"/></svg> Meet at the Vismarkt</b><span>Today 19:00 · about halfway for both · suggested by Sanne</span>
          <div class="who2">
            <div><span class="av2" style="background:#4374C4">S</span>Sanne<span class="st o"><svg class="i"><use href="#walk"/></svg>11 min</span></div>
            <div><span class="av2" style="background:#865CC4">J</span>You<span class="st o"><svg class="i"><use href="#bike"/></svg>12 min</span></div>
          </div>
        </div>
        <div class="consent"><svg class="i" style="color:var(--real)"><use href="#nav"/></svg><span>Going shares your real location with <b>Sanne</b> from 18:45 until you arrive.</span></div>
        <div class="brow" style="position:static;margin:0 12px 12px"><span class="po"><svg class="i"><use href="#check"/></svg>I'm going</span><span><svg class="i"><use href="#pin"/></svg>Another place</span></div>
      </div>
    </div>
    <h3><span>I</span>A suggested meet-up <em class="new">new</em></h3>
    <ul><li>v4's meet-up card, as it arrives in the thread. <b>New</b>: the place is suggested, not typed — about equally far for both, each by your own mode, moved onto a named place.</li>
        <li>The times are worked out from where each of you said you'd start, so nobody has to share a location just to be asked.</li>
        <li><b>I'm going</b> is v4's consent; <b>Another place</b> asks for the next one.</li></ul>
  </div>

  <div class="shot">
    <div class="screen" style="background-image:url(shots/chatworld.png)">
      <svg style="left:0;top:0" width="412" height="915" viewBox="0 0 412 915">
        <path d="M40 700 L90 640 L120 600 L150 540 L190 470 L224 410" stroke="#0A0E10" stroke-width="10" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
        <path d="M40 700 L90 640 L120 600 L150 540 L190 470 L224 410" stroke="#3E8EDE" stroke-width="5.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
        <path d="M400 170 L360 220 L330 262 L300 300 L262 350 L232 404" stroke="#0A0E10" stroke-width="10" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
        <path d="M400 170 L360 220 L330 262 L300 300 L262 350 L232 404" stroke="#3E8EDE" stroke-width="5.5" fill="none" stroke-linecap="round" stroke-linejoin="round" opacity=".75"/>
      </svg>
      <div class="dest new" style="left:228px;top:410px"><svg class="lpin"><use href="#logopin"/></svg><div class="name">Vismarkt · 19:00</div></div>
      <div class="gpsdot new" style="left:120px;top:600px"><div class="ring"><div class="core"></div></div><div class="name">You <b>· 6 min · bike</b></div></div>
      <div class="gpsdot new" style="left:330px;top:262px"><div class="ring"><div class="core"></div></div><div class="name">Sanne <b>· 4 min</b></div></div>
      <div class="sharepill" style="top:132px"><svg class="i"><use href="#nav"/></svg>Sharing with Sanne until you arrive</div>
      <div style="left:0;top:752px;width:412px;height:96px;background:rgb(28,26,24)"></div>
      <div class="chatline" style="left:16px;top:758px"><b>Sanne</b>Meet at the Vismarkt, 19:00 <span class="dim small">· going</span></div>
      <div class="chatline" style="left:16px;top:788px"><b>You</b>I'm going <span class="dim small">· by bike</span></div>
      <div class="chatline new" style="left:16px;top:818px"><b>Sanne</b>On the way <span class="dim small">· 4 min</span></div>
    </div>
    <h3><span>J</span>On the way, in the chat's World view <em class="new">new</em></h3>
    <ul><li>Both routes in today's blue, the meeting place as the logo's pin, each person as v4's blue real-location dot with their time left.</li>
        <li>The share is v4's: it started when you said you were going and <b>ends on arrival</b>, which posts "arrived".</li>
        <li>In driver mode, v4's <i>Let someone know when you'll arrive</i> (screen 8) is the same message for a trip that isn't a meet-up.</li></ul>
  </div>

</div>
</section>

<div class="notes">
  <div><h3>Stays exactly as today</h3><ul>
    <li><b>The router</b>: Car, Bike and Walk on the noded graph, long routes by tier, the cost model.</li>
    <li><b>The planner sheet</b>: its place, its two detents, the endpoint fields, pick-on-map, "Route to here" in the context menu.</li>
    <li><b>Driver mode</b> for the car: chase camera, turn card, route rail, reroute, arrival.</li>
    <li><b>Chats</b>: encryption, points, live location sharing and its chip. Routes, pins, people and buttons are drawn in chat-world v4's style.</li></ul></div>
  <div><h3>New</h3><ul>
    <li>Times for all three modes on the chips; Start names its action; Car needs a fix.</li>
    <li>Walking in the world: route drawn in the street, small turn card, Walk me there, Skip ahead.</li>
    <li>Routes that end at the door (BAG entrance points).</li>
    <li>Bike variant of driver mode.</li>
    <li>From a chat: <b>Route</b> on points and shared locations; v4's meet-up (screen 6) with a suggested place; each person's route and time on the chat's map; "arrived".</li>
    <li>Later: a desktop location source.</li></ul></div>
</div>

</body></html>