getStyleLayerInfo method

List<StyleLayerInfo> getStyleLayerInfo(
  1. Coordinates coords
)

Gets the style layers information at the given coordinates.

Returns the layers of the applied map style that have content at coords, topmost layer first. Only the layers currently visible in this view are considered.

Parameters

  • coords: WGS84 coordinates where style layer information is requested.

Returns

  • The style layers at coords, topmost first. Empty when no visible layer has content there, or when the view is not ready.

See also:

Implementation

List<StyleLayerInfo> getStyleLayerInfo(Coordinates coords) {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'MapView',
    'getStyleLayerInfo',
    args: coords,
  );

  final List<dynamic> listJson = resultString['result'];
  return listJson
      .map((dynamic layerJson) => StyleLayerInfo.fromJson(layerJson))
      .toList();
}