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

can not set map coordinate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Invalid
    • Affects Version/s: 5.12.3
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      ubuntu16.04
    • Platform/s:
      Linux/X11

      Description

      hi.

      i create a MapQuickItem component to show on map.

      so i initialize MapQuickItem and show on map.without any problem.

      when i change map coordinate MapQuickItem go to random places.

      when i write below code map show me it is in right place but it isnot.

      print(mapQuickItem.coordinate.latitude)
      print(mapQuickItem.coordinate.longitude)
      

      i test place with marker and show correctly. so i am sure this is not my problem. i thinks this is map bug.

      code is like this:

      I set map plugins and so on currectly.

      
      Rectangle {
      
      property MapQuickItem mapQuickItem
      
      //declare map
      Map {
      id: map
      anchors.fill: parent
      //set map plugin
      plugin: mapPlugin
      //set start of map position. in here i set iran
      center: QtPositioning.coordinate(32 , 53)
      
      }
      
      //function call from some where
      
      function createArea()
      {
      
      //i will correctly create MyMapQuickITem
      
      var object = createDynamicObject("qrc:/qml/MapPage/MyMapQuickITem.qml")
      
      object.coordinate: QtPositioning.coordinate(31, 53)
      
      map.addMapItem(object)
      
      mapQuickItem = object
      
      }
      
      }
      

       

      so when i update mapQuickItem.coordinate it must be update. but it doesnt update.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            paangele Paolo Angelelli
            Reporter:
            miladrahbari milad rahbari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes