transformWgsListToScreen method

List<Point<int>> transformWgsListToScreen(
  1. List<Coordinates> coords
)

Converts multiple WGS84 geographic coordinates to screen coordinates in batch.

Transforms a list of geographic locations (latitude, longitude, altitude) to their corresponding screen positions in physical pixels. This is more efficient than calling transformWgsToScreen repeatedly for multiple coordinates.

Screen coordinates are measured from the map view's top-left corner. The transformation depends on the current camera state, including position, zoom level, map angle, and view angle.

Parameters

  • coords: List of WGS84 geographic coordinates to convert

Returns

  • List of screen positions in physical pixels, in the same order as the input coordinates

See also:

Implementation

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

  final List<dynamic> listJson = resultString['result'];
  final List<Point<int>> retList = listJson
      .map(
        (final dynamic categoryJson) =>
            XyType<int>.fromJson(categoryJson).toPoint(),
      )
      .toList();
  return retList;
}