withUri static method

Basemap? withUri(
  1. Uri uri
)

Creates a basemap with the URI.

If the specified URI is a portal item URL (see PortalItem.withUri for the supported URL formats), the underlying PortalItem will be created and accessible through Basemap.item.

Parameters:

  • uri — URI of the basemap, commonly the URL of a web map portal item.

Implementation

static Basemap? withUri(Uri uri) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreURI = _CString(uri.toString());
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_Basemap_createWithURI(coreURI.bytes, errorHandler);
  });
  if (handle == ffi.nullptr) return null;
  return Basemap._instanceCache.instanceWith(handle);
}