Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Geocode doesn't return results anymore
Forum Updated to NodeBB v4.3 + New Features

Geocode doesn't return results anymore

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 664 Views 2 Watching
  • 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.
  • U Offline
    U Offline
    user_qt
    wrote on last edited by
    #1

    Hi Everyone,
    I have an issue with the geocoding feature in my desktop app, just a few days ago, I could find coordinates from adresses that the user enter using the GeoCodeModel from QtLocation, but suddenly today the feature doesn't give any results anymore. I tested it with all the versions of my app that were working before with different plugins (Mapbox, Mapboxgl, OSM) but without any results.

    here is a basic example that uses a very basic geocoding request :

    import QtQuick 2.9
    import QtQuick.Window 2.2
    import QtLocation 5.11
    import QtPositioning 5.11
    
     Window {
         visible:  true
         height:600
         width:600
    
     Map{
             id:map
             anchors.fill:parent
             plugin:Plugin{name: "osm" } // mapbox, mapboxgl
             center:QtPositioning.coordinate(59.930243,10.714635) // oslo
             zoomLevel: 15
    
    
         }
     
     GeocodeModel{
             plugin: map.plugin
             query :"paris"
             onLocationsChanged: {
                 console.log("The value of possible paths "+count) // here the value of count is always 0
                 if(count)
                     console.log("paris coordinate  \n"+get(0).coordinate) // it should normally output here the coordinates of paris, but nothing appears
             }
             Component.onCompleted: update()
    
         }
    
    }
    

    Even when I run the mapviewer example, it displays "unsuccessful geocode" message when I try the route with addresses feature.

    Thanks in advance

    Pablo J. RoginaP 1 Reply Last reply
    0
    • U user_qt

      Hi Everyone,
      I have an issue with the geocoding feature in my desktop app, just a few days ago, I could find coordinates from adresses that the user enter using the GeoCodeModel from QtLocation, but suddenly today the feature doesn't give any results anymore. I tested it with all the versions of my app that were working before with different plugins (Mapbox, Mapboxgl, OSM) but without any results.

      here is a basic example that uses a very basic geocoding request :

      import QtQuick 2.9
      import QtQuick.Window 2.2
      import QtLocation 5.11
      import QtPositioning 5.11
      
       Window {
           visible:  true
           height:600
           width:600
      
       Map{
               id:map
               anchors.fill:parent
               plugin:Plugin{name: "osm" } // mapbox, mapboxgl
               center:QtPositioning.coordinate(59.930243,10.714635) // oslo
               zoomLevel: 15
      
      
           }
       
       GeocodeModel{
               plugin: map.plugin
               query :"paris"
               onLocationsChanged: {
                   console.log("The value of possible paths "+count) // here the value of count is always 0
                   if(count)
                       console.log("paris coordinate  \n"+get(0).coordinate) // it should normally output here the coordinates of paris, but nothing appears
               }
               Component.onCompleted: update()
      
           }
      
      }
      

      Even when I run the mapviewer example, it displays "unsuccessful geocode" message when I try the route with addresses feature.

      Thanks in advance

      Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @user_qt you may need to check/think about what may have changed in your environment since the day it was "working".
      In addition, you may want to add checking for properties status, error and errorString to help you understand what is going on...

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      U 1 Reply Last reply
      0
      • Pablo J. RoginaP Pablo J. Rogina

        @user_qt you may need to check/think about what may have changed in your environment since the day it was "working".
        In addition, you may want to add checking for properties status, error and errorString to help you understand what is going on...

        U Offline
        U Offline
        user_qt
        wrote on last edited by
        #3

        @Pablo-J.-Rogina

        Thanks for the reply, I don't think that something has changed in my environment because I tested the working versions on other machines, and again no results.
        I changed the plugin to ESRI plugin and then it started giving results. However, the results are not as precise as OSM or Mapbox.
        Could that be a problem from the provider ?

        1 Reply Last reply
        0

        • Login

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