Routes & directions

Make paths connect at junctions

All guides

Wayfinding builds a routing graph purely from the geometry of the lines in your artwork — where they physically touch, cross and overlap. The names or IDs on your paths are never used to decide connections; they're just drawing labels. So the single most important thing for reliable routes is that your lines actually meet where you want a junction.

How two lines are joined

When Mapvera reads your network it looks for every place lines meet and turns each into a junction node. It joins lines in all the ways they can realistically meet:

Junction typeWhat it looks like
Shared or near endpointsTwo lines that end at (or very close to) the same point.
T-junctionOne line's endpoint touching the middle (body) of another line.
CrossingTwo lines that cross over each other — both are cut at the crossing and joined.
OverlapTwo lines that run along the same stretch — they merge.

You don't need to manually split a line at a junction, and you don't need matching IDs. If the geometry meets, Mapvera cuts the segments at the meeting point and merges them into one shared node.

"Close enough" is measured from stroke width

Two lines are treated as connected when their strokes visually overlap — roughly, when the gap between their centrelines is no more than half of each stroke plus a small buffer. This is deliberately relative to how thick you drew the lines, which is why a consistent, sensible stroke width matters: ends that look joined on screen are joined in the graph.

Because the tolerance is stroke-relative, there's no giant global "snap everything" that would wrongly weld unrelated corridors together. Connections stay local to where lines genuinely overlap.

When drawing isn't quite perfect

Real artwork has tiny gaps. Two settings let you tune the tolerance if a junction won't take:

SettingWhat it does
Snap bufferWidens the stroke-based tolerance a touch, to forgive small gaps left by imperfect drawing. A gentle nudge (defaults to a value of 2).
SnapA hard override, in map units, of the per-pair tolerance. Use only if you must — it replaces the stroke-relative rule with a fixed distance, so set it carefully.

Reach for these only when a specific junction refuses to connect. In almost every case the better fix is to tidy the artwork so the lines actually meet.

Watch out for disconnected islands

If part of your network never joins the rest, it becomes a separate island. Landmarks on different islands can't be routed between — that's the number-one cause of "No route found". Mapvera helps you catch this: when it builds the graph it logs the result to the browser console, for example the number of segments, nodes, connected components and destinations it found, and it warns you specifically when the network is split into more than one island.

  1. Open your map in a browser

    Load the map (the preview in the editor is fine) with the browser's developer console open (F12 → Console).

  2. Look for the connectivity report

    Find the [mapvera-routes] line reporting how many components the network has. More than one component means more than one island.

  3. Read the island warning

    If it's split, the warning lists which landmarks fell into which island — the ones that can't reach each other. Join those islands in your artwork and the warning clears.

Turn on the map's Developer mode to draw a dot at every junction node the engine found. It's the quickest way to see a missing junction — an expected node simply won't be there.