-1

I want to convert a few (X,Y) positions on the mapbox map to their lnglat positions.

I know project() converts from lnglat to X, Y. But, I can't find the reverse.

johnbumble
  • 630
  • 1
  • 10
  • 18

1 Answers1

1

map.unproject() exists and does what you need: https://docs.mapbox.com/mapbox-gl-js/api/map/#map#unproject

chriswhong
  • 362
  • 2
  • 9