PictureMarkerSymbol.withUri constructor

PictureMarkerSymbol.withUri(
  1. Uri uri
)

Creates a picture marker symbol from an image URL.

Supported image formats are BMP, GIF, ICO, JPEG, and PNG. Animated GIF is not supported.

Parameters:

  • uri — URL of the image.

Implementation

factory PictureMarkerSymbol.withUri(
  Uri uri,
) {
  _initializeArcGISEnvironmentIfNeeded();
  final coreURI = _CString(uri.toString());
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_PictureMarkerSymbol_createWithURL(
      coreURI.bytes,
      errorHandler,
    );
  });
  return ArcGISSymbol._instanceCache.instanceWith(handle);
}