Details
-
Bug
-
Resolution: Won't Do
-
Not Evaluated
-
None
-
5.15.14
Description
Steps to reproduce
Run the Minimal Map example (https://doc.qt.io/qt-5/qtlocation-minimal-map-example.html ) with the "mapbox" plugin:
Plugin { id: mapPlugin name: "mapbox" PluginParameter { name: "mapbox.access_token" value: <YOUR_ACCESS_TOKEN> } }
Issue 1
The Mapbox plugin uses a HTTP URL but Mapbox is now HTTPS-only. Consequently, we see this runtime error:
tile request error "Problem with tile image"
This is because the HTTP redirect message gets treated as the image. C:\Users\USERNAME\AppData\Local\cache\QtLocation\5.8\tiles\mapbox*.png all contain this text:
<html> <head><title>301 Moved Permanently</title></head> <body> <center><h1>301 Moved Permanently</h1></center> <hr><center>CloudFront</center> </body> </html>
Fix/Workaround 1
Simply switching from HTTP to HTTPS (https://github.com/qt/qtlocation/blob/v6.6.0-beta2/src/plugins/geoservices/mapbox/qmapboxcommon.h#L13 ) fixes this part.
If I'm not mistaken, the root cause is fixed by https://codereview.qt-project.org/c/qt/qtbase/+/475098 but that wasn't picked to Qt 5.15.
Issue 2
The default "mapbox.streets" tileset has been disabled:
- https://github.com/qt/qtlocation/blob/v6.6.0-beta2/src/plugins/geoservices/mapbox/qgeotilefetchermapbox.cpp#L60
- https://docs.mapbox.com/help/troubleshooting/migrate-legacy-static-tiles-api/#which-classic-styles-are-being-deprecated
Consequently, we see this runtime error (if the HTTPS issue is fixed):
QGeoTileRequestManager: Failed to fetch tile (8682,4766,14) 5 times, giving up. Last error message was: 'Error transferring https://api.tiles.mapbox.com/v4/mapbox.streets/14/8682/4766.png?access_token=<YOUR_ACCESS_TOKEN> - server replied: Gone'
Fix/Workaround 2
Selecting a different tileset ID such as "mapbox.mapbox-streets-v8", "mapbox.mapbox-terrain-v2", or "mapbox.satellite" works fine. For example:
Plugin { id: mapPlugin name: "mapbox" PluginParameter { name: "mapbox.access_token" value: <YOUR_ACCESS_TOKEN> } PluginParameter { name: "mapbox.map_id" // Note: Documented as deprecated value: "mapbox.mapbox-streets-v8" } }
See https://docs.mapbox.com/studio-manual/reference/tilesets/ for current tilesets.
Attachments
Issue Links
- relates to
-
QTBUG-92111 Esri plugin uses HTTP instead of HTTPS, creating 400 Bad Request
-
- Closed
-