UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 632 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import r from"../../core/Error.js";import{throwIfAborted as e}from"../../core/promiseUtils.js";async function t(t,o,a){let c;try{c=await createImageBitmap(t)}catch(l){throw new r("request:server",`Unable to load ${o}`,{url:o,error:l})}return e(a),c}async function o(t,o,a,c,l){let n;try{n=await createImageBitmap(t)}catch(i){throw new r("request:server",`Unable to load tile ${o}/${a}/${c}`,{error:i,level:o,row:a,col:c})}return e(l),n}export{t as createBitmap,o as createTileBitmap};