pointkit geocodes a plain address and hands back a GeoJSON Point object with correct [longitude, latitude] order per RFC 7946 — ready for Mapbox GL, Leaflet, Turf.js, or any API that speaks GeoJSON.
GeoJSON is the format the frontend mapping world standardized on — Mapbox GL, Leaflet, Turf.js, and most geospatial APIs read and write it natively. A point is {"type":"Point","coordinates":[longitude,latitude]}: longitude first, per RFC 7946.
That order is the opposite of how people say coordinates out loud, and the opposite of MySQL's default SRID 4326 — two easy ways to end up with a pin on the wrong continent and no error to explain why. pointkit geocodes the address directly into the correct order, so there's no manual reordering step to get wrong.
1600 Amphitheatre Parkway, Mountain View, CA is at latitude 37.4224, longitude -122.0842. RFC 7946 puts longitude first: [-122.0842, 37.4224].
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [-122.0842, 37.4224] },
"properties": { "name": "Googleplex" }
}
Leaflet reads GeoJSON longitude first, but its own marker and map calls take latitude first. Both of these put a pin in the same place:
L.geoJSON(feature).addTo(map); L.marker([37.4224, -122.0842]).addTo(map);
SELECT ST_GeomFromGeoJSON('{"type":"Point","coordinates":[-122.0842,37.4224]}');
| Target | Order | Example (37.4224, -122.0842) |
|---|---|---|
| MySQL 8.0+, SRID 4326 | lat, lng | ST_GeomFromText('POINT(37.4224 -122.0842)', 4326) |
| MariaDB, MySQL 5.7 | lng, lat | ST_GeomFromText('POINT(-122.0842 37.4224)', 4326) |
| Postgres / PostGIS | lng, lat | ST_GeomFromText('POINT(-122.0842 37.4224)', 4326) |
| WKT | lng, lat | POINT(-122.0842 37.4224) |
| GeoJSON | lng, lat | {"type":"Point","coordinates":[-122.0842,37.4224]} |
| Leaflet, Google Maps | lat, lng | L.marker([37.4224, -122.0842]) |
{"type":"Point","coordinates":[longitude,latitude]}. If your map library or API expects a full Feature or FeatureCollection, wrap it yourself — { "type": "Feature", "geometry": <this>, "properties": {} } is a one-line wrap once you have the coordinates.[longitude, latitude], per RFC 7946. This is the reverse of how coordinates are usually spoken out loud, and the reverse of MySQL/MariaDB's default SRID 4326 order.L.geoJSON and Turf.js all take the Point object as-is. The one trap is Leaflet’s own non-GeoJSON API: L.marker and L.latLng take [latitude, longitude], so pass the object through L.geoJSON rather than handing them the coordinates array.