Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Pop-up Latitude and Longitude when pressed on point feature
Forum Updated to NodeBB v4.3 + New Features

Pop-up Latitude and Longitude when pressed on point feature

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 2 Posters 432 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sony
    wrote on last edited by
    #1

    I want to display the lat,long values of a particular place on my raster image, when the marker symbol is clicked.
    I am able to display the marker but unable to display lat,long when pressed on marker symbol.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Can you please be a little bit more specific on what Qt stuff you're talking about here?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sony
        wrote on last edited by
        #3

        i have a raster image onto which i have added point , line , polygon features.
        i want to display the latitude and longitude values when i click on point feature.

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Sony said in Pop-up Latitude and Longitude when pressed on point feature:

          i want to display the latitude and longitude values when i click on point feature.

          So is this image geo-referenced?

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          2
          • S Offline
            S Offline
            Sony
            wrote on last edited by
            #5

            yes, its geo-referenced and overlaying on the basemap(topographic)...now i want to add
            lat,long onto the raster image when i click on marker symbol.

            1 Reply Last reply
            0
            • Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              I'm sorry but from what Qt component are you talking? I'm not aware of any class which provides something like you mentioned...

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Sony
                wrote on last edited by
                #7

                void Raster_point::componentComplete()
                {
                const QString datapath = defaultDataPath() + "D:/Sony/blr.tif";

                m_raster = new Raster(m_datapath + "blr.tif",this);
                m_rasterLayer = new RasterLayer(m_raster,this);
                
                m_basemap = new Basemap(m_rasterLayer, this);
                m_map= new Map(m_basemap,this);
                m_mapView = new MapGraphicsView(this);
                m_mapView->setMap(m_map);
                
                
                GraphicsOverlay* overlay = new GraphicsOverlay(this);
                 createGraphics(overlay);
                 m_mapView->graphicsOverlays()->append(overlay);
                
                // set the mapView as the central widget
                 setCentralWidget(m_mapView);
                

                }

                void Raster_point::createGraphics(GraphicsOverlay *overlay)
                {
                const Point center(77.599605,12.978822, SpatialReference::wgs84());

                Point point(77.599605,12.978822, SpatialReference::wgs84());
                
                SimpleMarkerSymbol* point_symbol = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Diamond, QColor(Qt::blue), 15, this);
                
                Graphic* point_graphic = new Graphic(point, point_symbol, this);
                
                overlay->graphics()->append(point_graphic);
                
                m_mapView->setViewpointCenter(center, 100000);
                

                }

                this is the code for displaying raster data with simple symbol marker. next i want to just display Lat,Long for a place.

                1 Reply Last reply
                0
                • Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  But where is Qt involved here? These are ESRI Qt runtime SDK classes afaics.

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  1 Reply Last reply
                  2

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved