loadArcGISOnlinePortalItemFeatureLayer method

Future<void> loadArcGISOnlinePortalItemFeatureLayer(
  1. AGMLArcGISOnlinePortalItem agmlArcGISOnlinePortalItem
)

Implementation

Future<void> loadArcGISOnlinePortalItemFeatureLayer(AGMLArcGISOnlinePortalItem agmlArcGISOnlinePortalItem) async {
  const method = '/loadArcGISOnlinePortalItemFeatureLayer';

  try {
    final channelResponse = await _channel.invokeMethod(method, agmlArcGISOnlinePortalItem.toMap()) as String;
    onLoadServiceFeatureChannelResponse(
      AGMLFeatureServiceLayer(
        url: 'https://www.arcgis.com/apps/mapviewer/index.html?layers=${agmlArcGISOnlinePortalItem.itemID}',
        viewPoint: agmlArcGISOnlinePortalItem.viewPoint
      ),
      channelResponse
    );
  } on PlatformException catch(e) {
    if(kDebugMode) print(e);
  }
}