Important: Please read the Qt Code of Conduct -

Plotting 3D Polyline on QML Map

  • I am currently trying to use the Map QML to display a set of coordinates with the minimal map example, but adding altitude as I found out Qt Coordinate holds one. This was meant to simulate flight trajectory paths from GPS data.

            Map {
                anchors.fill: parent
                plugin: mapPlugin
                center: QtPositioning.coordinate(59.91, 10.75) // Oslo
                zoomLevel: 10
                tilt: 90
                MapPolyline {
                    line.width: 3
                    line.color: 'green'
                    path: [
                        { latitude: 59.91, longitude: 10.75 , altitude: 100},
                        { latitude: 59.92, longitude: 10.75001, altitude: 125},
                        { latitude: 59.93, longitude: 10.75002, altitude: 1000 },
                        { latitude: 59.94, longitude: 10.74998, altitude: 20000000 }

    However, the resulting polyline was rather snaps on to the map, as if the altitude were all set to zero


    Is this is the expected result or is there any wrongdoings in my part? If this is intended, is there any other feature in Qt to help me project 3D trajectory on maps?

  • This is what I'm currently expecting to. The map is fine being 2D.


  • I'm also interested in the same thing. @Vigasto have you figured out a solution yet? Did you write a custom plugin?

  • Hi @martal, hi @Vigasto,
    I have the same kind of needs. I did quite a lot of googling and as weird as it is, it looks like a not so common problem. Did you find a solution ?

Log in to reply