coordinateForPixel

open override fun coordinateForPixel(pixel: ScreenCoordinate): Point

Calculate a geographical coordinate(i.e., longitude-latitude pair) that corresponds to a screen coordinate.

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

Map must be fully loaded for getting an altitude-compliant result if using 3D terrain.

This API isn't supported by Globe projection and will return a no-op result matching the center of the screen. See com.mapbox.maps.extension.style.projection.generated.setProjection and com.mapbox.maps.extension.style.projection.generated.getProjection

Return

Returns a geographical coordinate corresponding to the x y coordinates on the screen.

Parameters

pixel

A screen coordinate represented by x y coordinates.