Doesn’t have to be the same id. Here’s an example (in polish format) of a way that extends to another tile. The most important thing is that the coordinates should match up, and it is exactly at the edge of the tile.
Tile 1
[POLYLINE]
Type=0x01
EndLevel=4
Label=~[0x04]E2 NSE
DirIndicator=1
Data0=(3.0391936,101.7062182), … (2.6274582,102)
RoadID=1299
RouteParams=6,4,1,0,0,0,0,0,0,0,0,0
Nod0=0,1046,0
Nod1=
…
Nod16=224,2649,1
[END]
Tile 2
[POLYLINE]
Type=0x01
EndLevel=4
Label=~[0x04]E2 NSE
DirIndicator=1
Data0=(2.6274582,102), … (2.1308003,102.7412188)
RoadID=285
RouteParams=6,4,1,0,0,0,0,0,0,0,0,0
Nod0=0,1143,1
Nod1=56,462,0
Nod2=97,754,0
Nod3=215,375,0
Nod4=223,769,0
[END]
Some info from Rottweiller Auto-Routing guide (via http://cgpsmapper.com/route.htm))
All of the above are if we are using the gpsmapedit method. It seems that maproute can detect and join the matching nodes automatically, which I think is the best way to work with irregular-shaped maps.