Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Geocode doesn't return results anymore



  • 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



  • @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...



  • @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 ?


Log in to reply