getElevationGraph method

  1. @override
ElevationGraph getElevationGraph(
  1. String tag
)
override

Method returns location elevation graph ElevationGraph for specified tag tag Graph tag in CMS Returns Elevation graph instance or null. Returns ElevationGraph of the current location with the specified tag, if it exists. If elevation graph with the specified tag doesn't exist, function returns null.

Example:

// Get elevation graph by tag
if (graphTags.isNotEmpty) {
 ElevationGraph? elevationGraph = location.getElevationGraph(graphTags.first);
 if (elevationGraph != null) {
   demonstrateElevationGraphUsage(elevationGraph);
 }
}

Implementation

@override
ElevationGraph getElevationGraph(String tag) {
    final _getElevationGraphFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
        Pointer<Void> Function(Pointer<Void>, Pointer<Void>),
        Pointer<Void> Function(Pointer<Void>, Pointer<Void>)
      >('navigine_sdk_flutter_Location_getElevationGraph__Tag'));
    final _tagHandle = navigine_sdk_flutter_String_ToFfi(tag);
    final _handle = this.handle;
    final __resultHandle = _getElevationGraphFfi(_handle, _tagHandle);
    navigine_sdk_flutter_String_ReleaseFfiHandle(_tagHandle);
    final _result = navigine_sdk_flutter_ElevationGraph_FromFfi(__resultHandle);
    navigine_sdk_flutter_ElevationGraph_ReleaseFfiHandle(__resultHandle);
    return _result;
}