Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75528

Qml Location Map visibleRegion property isn't well documented

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 5.12.3
    • None
    • All

    Description

      It doesn't seem to very clear what visible region is or how it can be used.

      It need the visible region to construct a coordinate system for an UTM Overlay. Works perfect, but I cannot figure out how the qvisibleRegion works exactly even with reading the sourcecode. IMHO visibleRegion should be (that is what I'm currently using):

      Map {
        id: mapBase
      
        onCenterChanged: {
          var region = QtPositioning.path();
          region.addCoordinate(mapBase.toCoordinate(Qt.point(0, 0)));
          region.addCoordinate(mapBase.toCoordinate(Qt.point(width, 0)));
          region.addCoordinate(mapBase.toCoordinate(Qt.point(width, height)));
          region.addCoordinate(mapBase.toCoordinate(Qt.point(0, height)));
      
          utmOverlay.visibleRegion = region
        }
      }
      
      UTMOverlay {
        id: utmOverlay
      }

      The visibleRegion of Map also delivers a polygon but it is not clear how it correlates to the screen coordinates. This is very important if one wants to use visibleRegion for the construction of an overlay component/mapping coordinate transformation.

       

       

       

      Attachments

        Activity

          People

            paangele Paolo Angelelli
            kbee Andor Greissl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: