Topological road-boundary detection using remote sensing imagery plays a critical role in creating high-definition (HD) maps and enabling autonomous driving. Previous approaches follow an iterative graph-growing paradigm for road-boundary extraction, where road boundaries are predicted vertex by vertex and instance by instance to output a graph, resulting in limitations of low inference speed. In this work, we formulate the road boundaries as polylines instead of a graph and propose a novel polyline transformer for topological road-boundary detection, termed PolyRoad. PolyRoad is built on the transformer architecture and is capable of detecting all road boundaries in parallel, which greatly improves the training and inference speed compared with the graph-based methods. To perform bipartite matching between the ground truth and predicted polylines, we develop a polyline matching cost to measure the distance, considering the order of open and closed polylines. In addition, we propose three different losses for supervising polyline learning: the order-oriented