fromBasemapType
suspend fun fromBasemapType(style: ArcGisBaseMapType, options: ArcGisMapServerImageryProvider.ConstructorOptions? = definedExternally): ArcGisMapServerImageryProvider(source)
Creates an ImageryProvider which provides tiled imagery from an ArcGIS base map.
// Set the default access token for accessing ArcGIS Image Tile service
ArcGisMapService.defaultAccessToken = "<ArcGIS Access Token>";
// Add a base layer from a default ArcGIS basemap
const provider = await ArcGisMapServerImageryProvider.fromBasemapType(
ArcGisBaseMapType.SATELLITE);
Content copied to clipboard
// Add a base layer from a default ArcGIS Basemap
const viewer = new Viewer("cesiumContainer", {
baseLayer: ImageryLayer.fromProviderAsync(
ArcGisMapServerImageryProvider.fromBasemapType(
ArcGisBaseMapType.HILLSHADE, {
token: "<ArcGIS Access Token>"
}
)
),
});
Content copied to clipboard
Return
A promise that resolves to the created ArcGisMapServerImageryProvider.
Parameters
style
The style of the ArcGIS base map imagery. Valid options are ArcGisBaseMapType.SATELLITE, ArcGisBaseMapType.OCEANS, and ArcGisBaseMapType.HILLSHADE.
options
Object describing initialization options.