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. Qt Location Esri Plugin
Forum Updated to NodeBB v4.3 + New Features

Qt Location Esri Plugin

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 1 Posters 362 Views 1 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.
  • M Offline
    M Offline
    MKerr
    wrote on last edited by MKerr
    #1

    Qt 5.15.2, macOS

    I'm trying to build a PlaceSearchModel using the Esri plugin. The code successfully runs using the Mapbox plugin but doesn't work when swapped with the Esri plugin. Any advice or leads would be greatly appreciated!

    PlaceSearchModel {
        plugin: EsriPlugin // singleton
        property variant _searchRegion: QtPositioning.circle(searchLocation,
                                                            searchRadius)
        searchArea: _searchRegion
    ...
    }
    

    When a search is entered, the model returns this error from the Esri servers:

    Error transferring http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=json&location=-118.338,34.069&searchExtent=-118.392,34.114,-118.284,34.0241&singleLine=pi&outFields=* - server replied: Bad Request

    I noticed the Geocode endpoint in Esri's documentation is a different pattern than the one in the error code above.
    https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?address={searchText}&outFields={fieldList}&f=json&token=YOUR-API-KEY

    Any idea what's going wrong, or how I should approach this problem?
    Thank you!

    Update:

    I manually retrieved the server's JSON response through the browser

    {"error":{"code":400,"message":"HTTP not supported","details":[]}}
    

    Seems the plugin uses HTTP instead of HTTPS. The same request using HTTPS works successfully.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MKerr
      wrote on last edited by MKerr
      #2

      Replacing HTTP with HTTPS in the QtLocation esri plugin code solved the problem.
      QTBUG-92111

      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