Atlaslog
Atlaslog / MapLibre GL JS / API / unproject
MapLibre GL JS · API reference

unproject

Quick answer

unproject ( point : PointLike ): LngLat

Last verified 2026-11-03 · MapLibre GL JS 4.x · Cite this page
Runnable examplesChinese noteAll API topics
unproject()

unproject(point: PointLike): LngLat

Defined in: ui/map.ts:2110

Returns a LngLat representing geographical coordinates that correspond to the specified pixel coordinates.

Parameters

Parameter Type Description
point PointLike The pixel coordinates to unproject.

Returns

LngLat

The LngLat corresponding to point.

Example

map.on('click', (e) => {
  // When the map is clicked, get the geographic coordinate.
  let coordinate = map.unproject(e.point);
});

TutorialsAPI index
English reference text adapted from the official MapLibre GL JS documentation, © MapLibre contributors, licensed under BSD-3-Clause.
Original page: https://maplibre.org/maplibre-gl-js/docs/API/classes/Map/ · Chinese note: /maplibre/api/unproject.html
Cite this page

Atlaslog (2026). unproject. https://www.jingweizhi.com/en/maplibre/api/unproject.html (accessed 2026-11-03).