coordinateInfoForPixel

Calculates the geographical coordinate information that corresponds to a given screen coordinate.

The screen coordinate is in MapOptions.size platform pixels relative to the top left of the map (not of the whole screen).

The returned coordinate will be the closest position projected onto the map surface, in case the screen coordinate does not intersect with the map surface.

It will suspend until current MapState is set to the MapboxMap composable function.

Return

A CoordinateInfo record containing the geographical coordinate and whether it is on the map surface.

Parameters

pixel

The screen coordinate on the map, in platform pixels.