# Esri/Leaflet : converting between pixel coordinates and latitude/longitude coordinates

**URL:** <https://discourse.processing.org/t/esri-leaflet-converting-between-pixel-coordinates-and-latitude-longitude-coordinates/33418>\
**Category:** Libraries\
**Created:** [November 9, 2021, 1:31pm UTC](https://discourse.processing.org/t/esri-leaflet-converting-between-pixel-coordinates-and-latitude-longitude-coordinates/33418 "2021-11-09T13:31:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cartopher](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/cartopher/32/14691_2.png) [@cartopher](https://discourse.processing.org/u/cartopher)\
**Post date:** [November 9, 2021, 1:31pm UTC](https://discourse.processing.org/t/esri-leaflet-converting-between-pixel-coordinates-and-latitude-longitude-coordinates/33418/1 "2021-11-09T13:31:48Z")

</div>

I’m currently working on an interactive map using p5.js. Having said that, I’m on a mission to figure out how to communicate between a p5.js sketch and the leaflet map’s geographic coordinates, i.e., converting between pixel coordinates and latitude/longitude coordinates.

Is there anyone who can provide information or resources?

---

<div class="post-metadata">

**Author:** ![javagar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/javagar/32/11434_2.png) [@javagar](https://discourse.processing.org/u/javagar)\
**Post date:** [November 9, 2021, 4:43pm UTC](https://discourse.processing.org/t/esri-leaflet-converting-between-pixel-coordinates-and-latitude-longitude-coordinates/33418/2 "2021-11-09T16:43:57Z")

</div>

Would the following, from the [Leaflet API Reference](https://leafletjs.com/reference-1.1.0.html), be helpful?

- [`project (<[LatLng]> latlng, <Number> zoom)`](https://leafletjs.com/reference-1.1.0.html#map-project)
- [`unproject (<[Point]> point, <Number> zoom`)](https://leafletjs.com/reference-1.1.0.html#map-unproject)
