Hello,
I am trying to use the QT Quick Example project for a minimal map and it is not working with the esri plug in. I remember using it almost a year ago and it was working. I know the map code is working since I can use the osm plug in successfully. I have tried with my API key, and without. Since I am just trying to show a map I don't think I even need the API key.
I have tried the two following approaches.
Plugin {
id: mapPlugin
name: "esri"
PluginParameter { name: "esri.token"; value: "my-api-key" }
}
And
Plugin {
id: mapPlugin
name: "esri"
}
Can someone provide help why this is not working. I am using QT 5 and this specific example:
https://doc.qt.io/qt-5/qtlocation-minimal-map-example.html
Hi @DevalGupta . I did a quick test on macOS and it worked for me, but I did not specify any PluginParameters.
As a starting point, see if you can get a map loading with that alone.
Here are more details about the "esri" plugin: https://doc.qt.io/qt-5/location-plugin-esri.html. This will provide more details on what is required.
Screen Shot 2023-06-01 at 12.47.59 PM.png
It is worth mentioning that the "esri" Qt location provider has not be ported to Qt 6, so you'll be limited to working with Qt 5.
I am running on linux, and my code looks the exact same and it is not working.
Screenshot 2023-06-01 at 1.00.38 PM.png
Screenshot 2023-06-01 at 1.01.43 PM.png
@DevalGupta I tried on Linux and I get the same thing.
I checked the network requests and this logic is using the older, non-https endpoints by default. For example this request goes out for a map tile:
http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/15/9530/17362
ArcGIS Online returns a 301 redirect for the https endpoint version and that works fine on macOS. I don't know for certain, but I suspect there could be a problem with the SSL configuration on Linux with Qt 5 since that would be required for the https tile endpoints, or the networking is getting tripped up by the 301 redirect. I suspect the SSL issue.
I hope this is helpful even if I wasn't able to fully get to the bottom of the issue.
@DevalGupta @JamesBallard1 I faced a similar problem. Esri returns "no error" code but no maptile/map shown at all. I am using Linux with Qt5.15.x ( where x=.2, .8, .10, .14). I changed to several QtLocation versions and replace the plugins but I still got the empty map as DevalGupta. I am not sure if I roll back to older Qt and it would work. I tested on Qt6.4 and it seems the other map plugins apart from OSM don't work at all. Any suggestion on this issue would be very much appreciated.