File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -1004,12 +1004,26 @@ bool QgsCesiumTilesDataProvider::init()
1004
1004
const QgsNetworkReplyContent content = networkRequest.reply ();
1005
1005
const json tileAccessJson = json::parse ( content.content ().toStdString () );
1006
1006
1007
- tileSetUri = QString::fromStdString ( tileAccessJson[" url" ].get <std::string>() );
1007
+ if ( tileAccessJson.contains ( " url" ) )
1008
+ {
1009
+ tileSetUri = QString::fromStdString ( tileAccessJson[" url" ].get <std::string>() );
1010
+ }
1011
+ else if ( tileAccessJson.contains ( " options" ) )
1012
+ {
1013
+ const auto &optionsJson = tileAccessJson[" options" ];
1014
+ if ( optionsJson.contains ( " url" ) )
1015
+ {
1016
+ tileSetUri = QString::fromStdString ( optionsJson[" url" ].get <std::string>() );
1017
+ }
1018
+ }
1008
1019
1009
- // The tileset accessToken is NOT the same as the token we use to access the asset details -- ie we can't
1010
- // use the same authentication as we got from the providers auth cfg!
1011
- mHeaders .insert ( QStringLiteral ( " Authorization" ),
1012
- QStringLiteral ( " Bearer %1" ).arg ( QString::fromStdString ( tileAccessJson[" accessToken" ].get <std::string>() ) ) );
1020
+ if ( tileAccessJson.contains ( " accessToken" ) )
1021
+ {
1022
+ // The tileset accessToken is NOT the same as the token we use to access the asset details -- ie we can't
1023
+ // use the same authentication as we got from the providers auth cfg!
1024
+ mHeaders .insert ( QStringLiteral ( " Authorization" ),
1025
+ QStringLiteral ( " Bearer %1" ).arg ( QString::fromStdString ( tileAccessJson[" accessToken" ].get <std::string>() ) ) );
1026
+ }
1013
1027
mAuthCfg .clear ();
1014
1028
}
1015
1029
}
You can’t perform that action at this time.
0 commit comments