I followed in QtLocation 5.9 source code how they were handling the MapPolyline elements that can be added to the Map QML element. So far, I found out that : qgeomap.cpp adds all those items in a "m_mapItems" list as "QDeclarativeGeoMapItemBase" As subclass called "QDeclarativePolylineMapItem" is in charge of the Polyline element, which is then drawn directly with OpenGL calls on top of the map. This uses an internal "MapPolylineNode" class, which is doing the OpenGL call (things like "geometry_.setDrawingMode(QSGGeometry:rawTriangl eStrip);" )., through the "geometry_" variable. The QDeclarative*MapItems (polylines, polygons, ...) exist from Qt 5.0 from the documentation, so it may be possible to restore this functionality by making the MapboxMap a derivative of the GeoMap class, and adding some glue (if the one from 5.6 has enough) ? The second way would be to code that behavior in a custom class, like MapboxMap, but keeping the raw GL way (to let the GPU handle the coordinates changes, and not computing them by hand which would be difficult). And then, there is the solution rinigus presented, to add a layer through GeoJSon to do this in the MapBoxGL Engine. I am not sure yet what the advantages and drawbacks of each solutions are, especially the overhead of adding a layer compared to a few direct GL calls.
If stucked, we may ask somone of Jolla staff for that one (maybe during a community meeting, or through TJC) ? Having a high performances mapping/routing application is probably something they would like to have in their catalog, seeing how limited the default maps application they provide is. Not sure who is the OpenGL specialist there. Stskeeps obvioulsy comes in mind, and back in time, there was also w00teh. But I am sure there are others...