To be clear this is a question not a bug
1. A concise explanation of the problem you’re experiencing.
Extract the url (and session tokens if necessary) from:
createWorldImagery({ style: IonWorldImageryStyle.AERIAL })
``
``
And other imagery creation provider functions (ArcGisMapServerImageryProvider, WebMapServiceImageryProvider, etc…).
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
createWorldImagery({ style: IonWorldImageryStyle.AERIAL })
``
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
We’re saving the user’s base maps using a structure like the one below.
{
“category”: “Cesium ion”,
“creationFunction”: “createWorldImagery({ style: IonWorldImageryStyle.AERIAL })”,
“display”: true,
“iconUrl”: “buildModuleUrl(“Widgets/Images/ImageryProviders/bingAerial.png”)”,
“name”: “Bing Maps Aerial”,
“tooltip”: “Bing Maps aerial imagery, provided by Cesium ion”
},
``
We
have some entries in that point to our servers as well as the default ones Cesium provides (specifically the Bing ones). However, due to various network and server reliablity issues sometime the various servers are unavailable or unreachable. As such we’re trying to implement some code that will get the URLs and if needed the session tokens and ‘ping’ the servers.
However, where we’re hitting a brick wall is getting the URL out of the creation functions. Of course we could add the base URL of the server to the structure above but it’s not ideal as we’ll have to update 2 urls.
4. The Cesium version you’re using, your operating system and browser.
Cesium: 1.53.0
Browser: Chrome 72.0.3626.121
OS: Windows 10