I have a leaflet.js map that has a square that come from an external GeoJSON file. I want to pass the center of the square (I calculated the coordinates ) to the setView function, how do I convert the coordinates? (When I passed the values from the the GeoJSON directly to setView It showed some other place, as I understand it doesn't use the same coordinate reference system)
I suspect you just passed coordinates with the wrong order:
[longitude, latitude]
[latitude, longitude]