New answers tagged road
I don't know what could be the difference between console and plugin, I think it should to work either way. Also you try to replace layer.commitChanges() (which makes not sense there) with layer.triggerRepaint() and look if that helps (note it is not necessary to call mapCanvas.refresh()). You can also use custom properties for the layer to enable labeling, ...
There is a relatively detailed discussion on this topic here which is still largely valid. Afaik there are few if any library to perform map-matching out of the box. It depends also on which data you're using for the road network. In the case of OpenStreetMap (OSM), take a look at my profile for ref to an available API.
Top 50 recent answers are included