version property

String version

The mobile map package's version.

The mobile map package version is set when the package is authored in ArcGIS Pro or when it is generated by the OfflineMapTask.

This property will be populated when you attempt to load the package. The version property will always be populated for you to examine, even if the package is an unsupported version.

This API currently supports mobile map packages up to and including major version 5.

You may wish to check the version property before trying to access specific functionality. For example:

  • Expiration details are only available from mobile map package version 3.1 onwards
  • Links to online services are only available from mobile map package version 4.0 onwards

If the package fails to load, check that the version number has not exceeded the supported major version.

Implementation

String get version {
  final stringHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_MobileMapPackage_getVersion(
      _handle,
      errorHandler,
    );
  });
  return stringHandle.toDartString();
}